

 
                menuFix(); 
                 {$("#nav-10067").find("div:last-child").append("<iframe scrolling='no' frameborder='0'></iframe>").css({overflow:"hidden"});}           
                $("#primary-navigation ul li>span").addClass("nav");                  
                $("#primary-navigation ul li.current").next("li").addClass("nobg");            
			    $("#primary-navigation ul li").hover(
			        function () {
									if( $(this).attr("class") == "parent current" ) {
											$(this).next("li").addClass("nobg");
										}
									else {
									    if( $(this).attr("class") == "current" ) {
											$(this).addClass("z");
										}									
									    else {
									        if ($(this).next("li").attr("class") == "current") {
									                $(this).addClass("hover");
									                } else {									               
									                            $(this).addClass("hover");
									                            $(this).next("li").addClass("nobg");									                           
									                    }  									    
									   }
									}
								$(this).addClass("hover");},function(){
									if( $(this).attr("class") == "nobg hover" ) {									
											$(this).removeClass("hover");
											$(this).next("li").removeClass("nobg");
										}
									else { 
									    if ( $(this).attr("class") == "nobg hover" ) {
									        $(this).removeClass("hover");
											$(this).next("li").removeClass("nobg");
									    } 									    
									    else {
								    		if( $(this).attr("class") == "hover" ) {
								    			$(this).removeClass("hover");
								    			$(this).next("li").removeClass("nobg");
								    		}
								    		else {
								    		   if( $(this).attr("class") == "parent hover" ) {
								    			$(this).removeClass("hover");
									    		$(this).next("li").removeClass("nobg");
										        } 
										        else {
										            if( $(this).attr("class") == "current z" ) {
								    			        $(this).removeClass("z");									    		        
										                }
										       }
										}
									}}
                $(this).removeClass("hover");});                 
				        

function menuFix() 
{
	//adding extra spans
menuSpan();	
	
	//adding extra div for shadow
	addShadow();

		
}


function menuSpan(){
	var el;
	for(var i = 0; i < document.getElementById("primary-navigation").getElementsByTagName("li").length; i++){
		el = document.getElementById("primary-navigation").getElementsByTagName("li")[i];
		if(el.parentNode.className == "nav-top"){
			var oldLink = el.getElementsByTagName("a")[0];
			var span = document.createElement("span");
			var link = document.createElement("a");
		
			link.href = oldLink.href;
			link.innerHTML = oldLink.innerHTML;
		
			span.appendChild(link);
			el.replaceChild(span, oldLink);
		}
	}
}
function addShadow(){
	var el;
	for(var i = 1; i < document.getElementById("primary-navigation").getElementsByTagName("ul").length; i++){
		el = document.getElementById("primary-navigation").getElementsByTagName("ul")[i];
					
		var shadowBox = document.createElement("div");
		var newList = document.createElement("ul");
		newList.innerHTML = el.innerHTML;
		shadowBox.appendChild(newList);
		el.parentNode.replaceChild(shadowBox, el);
		
		
	}
}



