//***** MODIFY ON 08 nov 2007 *****
$(document).ready(function(){
   var isSubHomePage = $("#headerNav .currentItem").is("li");
   if(isSubHomePage){
   	fireTimeOut=(setTimeout("initTimeOut()",200));
   }
   else{
      initNav()
   }
});

function initTimeOut(){
	$("#headerNav .leftNav").slideToggle("fast",function(){
		$("#headerNav .item1").removeClass("currentItem");									  
		$(".item1").hover(function () {
      	$("#headerNav .leftNav").slideDown("fast");
      	$("#headerNav .item1").addClass("currentItem");
      	this.blur();
      },
   		function () {
         	$("#headerNav .leftNav").slideUp("fast");
         	$("#headerNav .item1").removeClass("currentItem");
         	this.blur();
         }
      );
   });
}

function initNav(){						  
	$("#headerNav .item1").hover(function () {
      $("#headerNav .leftNav").slideDown("fast");
   	$("#headerNav .item1").addClass("currentItem");
   	this.blur();
   },
      function () {
         $("#headerNav .leftNav").slideUp("fast");
      	$("#headerNav .item1").removeClass("currentItem");
      	this.blur();
      }
   );
}


function initNav(){                                                                                             
		$("#headerNav .item1").hover(function () {
      $("#headerNav .leftNav").slideDown("fast",function(){
					var heightNav = $("#headerNav .item1 .leftNav").height();
					var layerSibling = $("#headerNav li.item1");
					if (typeof document.body.style.maxHeight === "undefined") {
													layerSibling.prepend("<iframe  class=\"selectFrameCatalogue\"></iframe>");
													$(".selectFrameCatalogue").css("height",heightNav+"px");
					}
			});
			$("#headerNav .item1").addClass("currentItem");
			this.blur();
   },
      function () {
					
				if (typeof document.body.style.maxHeight === "undefined") {
												$(".selectFrameCatalogue").remove();
				}
				$("#headerNav .leftNav").slideUp("fast",function(){
												if (typeof document.body.style.maxHeight === "undefined") {
												$(".selectFrameCatalogue").remove();
												}
				 });
				$("#headerNav .item1").removeClass("currentItem");
				this.blur();
      }
   );
}

//***** END MODIFY ON 08 nov 2007 *****