function initMenu()
{
	var nodes = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<nodes.length; i++)
	{
		nodes[i].onmouseover = function()
		{
			this.className += " hover";
		}
		nodes[i].onmouseout = function()
		{
			this.className = this.className.replace(" hover", "");
		}
	}
}
if (document.all && !window.opera) attachEvent("onload", initMenu);


$(document).ready(function(){
		
	function zindexUp() {
		$(".articlesHeadHolder").css("z-index", "10");
	};
	function zindexDown() {
		$(".articlesHeadHolder").css("z-index", "0");
	};

	var iframe=$('iframe#articlesHeadFrame');  //the id of the iframe

	iframe.load(function(){
		var navdiv=iframe.contents().find("#nav").children();  
		
		navdiv.hover(
		function() {
		   zindexUp(); //it calls now a script from the main page
		},
		function() {
		   zindexDown();
		}); //close navdiv.hover
		
		var navlogo=iframe.contents().find("#header-wrapper-container");
		
		navlogo.hover(
		function() {
		   zindexUp(); //it calls now a script from the main page
		},
		function() {
		   zindexDown();
		}); //close navlogo.hover
		
	}); // close iframe.load
	
	$("#view-listings2").addClass("hidden"); // hide form on load
	
	$("span.choose").click(function () { 
	  $(this).removeClass("choose").addClass("viewlistings2");
	  $(this).find("Choose by state:").text("&nbsp;");
    });


});
