
jQuery("#"+navItemId).children().remove();

jQuery(document).ready(function() {
	
jQuery("#"+navItemId).children().remove();

jQuery("#"+navItemId).html("<style> .submenuitem, .menuitem { font-family:verdana; font-weight:bold; text-decoration:none; font-size:13px; z-index:99; } .submenuitem {display:none;position:absolute;background-color:#333; margin:0px; text-align:left; padding:0px 0px 0px 0px; margin-left:-5px; margin-top:5px; width:auto; height:auto; } .submenuitem li {color:white; list-style: none; margin:3px 0px 0px 5px; padding:0px; width:174px; height:20px; display:block; background-color:#333; } .nav div { height:30px; padding-left:15px; padding-right:15px; float:left; padding-top:7px; } .nav { background-image:url(http://www.apcw.org/images/nav-middle.gif); height:34px; text-align:center; width:100%; } .nav a:link, .nav a:visited, .nav a:active { font-family:verdana; font-weight:bold; text-decoration:none; } .nav a { color:white;}</style><div style=\"display:block;\"><img style=\"width:4px;height:34px;float: left;margin-right:-3px;\" alt=\"\" src=\"http://www.apcw.org/images/nav-leftend.gif\"> <img style=\"width:4px;height:34px;float: right;margin-left:-3px;\" alt=\"\" src=\"http://www.apcw.org/images/nav-rightend.gif\"> <div class=\"nav\"> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/\">Home</a> <ul class=\"submenuitem\"> <li><a style=\"color:white;\" href=\"http://www.apcw.org/\">Main APCW</a></li><li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/\">Members Area</a></li></ul></div><div class=\"menuitem\"><a style=\"color:white;\"  href=\"http://www.apcw.org/videos.aspx\">Videos</a> <ul class=\"submenuitem\"><li><a style=\"color:white;\" href=\"http://www.apcw.org/videos.aspx\">Perspectives Weekly</a></li><li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/video\">Featured</a></li><li><a style=\"color:white;\" href=\"http://www.youtube.com/user/apcwauditor\">APCW Reports</a></li> <li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/page/apcw-interviews\">Interviews</a></li> <li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/page/grand-prive-rogue-affiliate\">Grande Priv&eacute;</a></li> </ul> </div> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/audits.aspx\">Audits</a></div> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/podcasts.aspx\">Podcasts</a> <ul class=\"submenuitem\"> <li><a style=\"color:white;\" href=\"http://www.apcw.org/podcasts.aspx\">Perspectives Now</a></li> <li><a style=\"color:white;\" href=\"http://www.blogtalkradio.com/apcw\">Affiliate Focus</a></li> </ul> </div> <div class=\"menuitem\"><a style=\"color:white;\" target=\"_blank\" href=\"http://www.gpwa.org/forum/apcw-videos-audits-industry-news.html\">Forums</a> <ul class=\"submenuitem\"> <li><a style=\"color:white;\" target=\"_blank\" href=\"http://www.gpwa.org/forum/apcw-videos-audits-industry-news.html\">APCW Forum at GPWA</a></li> <li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/forum\">APCW Message Board</a></li> </ul> </div><div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/profiles\">Members</a> <ul class=\"submenuitem\"><li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/profiles/members/\">All Members</a></li><li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/profiles\">My Page</a></li><li><a style=\"color:white;\" href=\"http://www.apcwinteractive.org/invite\">Invite Friends</a></li> </ul> </div><div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/affiliate-programs.aspx\">Affiliate Programs</a></div> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/events/events.aspx\">Events</a></div> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/partners.aspx\">Partners</a></div> <div class=\"menuitem\"><a style=\"color:white;\" href=\"http://www.apcw.org/about-us.aspx\">About Us</a></div></div></div>");

jQuery("#"+navItemId+" ul li").css("float","none");

jQuery(".submenuitem").css("padding-bottom","5px");

if (jQuery.browser.msie && parseInt(jQuery.browser.version) == 7)
{
	jQuery("#"+navItemId).css("width","945px");
	jQuery("#"+navItemId).css("background-image","none");
	jQuery("#"+navItemId).css("height","auto");
	jQuery("#"+navItemId).css("margin-top","2px");
	jQuery(".nav").css("width","auto");
	jQuery("ul.submenuitem").css("margin-left","-55px");
	jQuery("ul.submenuitem").css("margin-top","20px");
	
}
	
});

jQuery(document).ready(function()
	{
		jQuery('.nav').hover(function() {
			
		}, function(e) {
			var t = jQuery(this).offset().top;
			var l = jQuery(this).offset().left;
			//alert (e.pageY+ ' ' + t);
			if (e.pageY < t || e.pageX < l)
				jQuery("ul.submenuitem").hide();
		});
		
		//jQuery('.menu').bind('mouseout',function()
		//	{
		//		jQuery("ul.submenuitem").fadeOut('fast');
		//	});
		
		//var activeParent = null;
		
		jQuery('.submenuitem').hover(function()
			{
				//alert('hover');
				//jQuery("ul.submenuitem").hide();
			},
			function(e)
			{
				var parent = jQuery(this).parents('.menuitem');
				
					var ppl = parent.offset().left;// + jQuery('.nav').position().left;
					var ppt = parent.offset().top;// + jQuery('.nav').position().top;
					var ppw = parent.width();
					var pph = parent.height();
					var inside = e.pageX >= ppl  && 					e.pageY >= ppt &&					e.pageX <= (ppl+ppw) && 					e.pageY <= (ppt+pph);
				//alert( 'inside: ' + inside+ ' x: ' + e.pageX + ' y' + e.pageY + ' left:' + ppl + ' top:' + ppt + ' width:' + ppw + ' height: ' + pph);
				
				//	return;
				if (!inside)
					jQuery(this).hide();
			}
			
			);

		jQuery('.menuitem').hover(function() 				   
			{
					//activeParent = jQuery(this);
					
				jQuery(this).siblings().children("ul.submenuitem").hide();
				jQuery(this).find(".submenuitem").show();
			}
			
		, 
		function() 
		{
		});
		
	}); 


/* This code should only affect the apcwinteractice.org site */

jQuery(document).ready(function() {
//if (!(jQuery.browser.msie && parseInt(jQuery.browser.version) == 7)){
	jQuery("#xg_sitename").prepend("<div id='joinus2' style='display:block;left:520px;top:70px;position:absolute;text-align: right; float: right; font-family: Tahoma; font-size: 12px; color: rgb(107, 142, 162);'>"+jQuery("#joinus").html()+"</div>");
	
	//}
	
	
	});



jQuery(document).ready(function() {

jQuery("#xg_sitename").prepend("<div id='joinus2' style='display:block;left:520px;top:70px;position:absolute;text-align: right; float: right; font-family: Tahoma; font-size: 12px; color: rgb(107, 142, 162);'>"+jQuery("#joinus").html()+"</div>");

});


