function initMenu()
{
var _nav = document.getElementById("nav");
if (_nav) {
   var nodes = _nav.getElementsByTagName("li");
   for (var i=0; i<nodes.length; i++) {
      nodes[i].onmouseover = function()
      {
         if (this.className.indexOf('hover') == -1)
            this.className += " hover";
      }
      nodes[i].onmouseout = function()
      {
         this.className = this.className.replace(" hover", "");
      }
   }
}
}
if (document.all && !window.opera) attachEvent("onload", initMenu);


function ReturHebDate(tday,tmonth,tyear)
{
    var now = new Date;
	if(tyear < 1900)
		// if date from Netscape, then add 1900
		tyear += 1900;
	var hebDate = civ2heb(tday, tmonth, tyear);
	var hmS = hebDate.substring(hebDate.indexOf(' ')+1, hebDate.length);
	var	hDay = eval(hebDate.substring(0, hebDate.indexOf(' ')));
	var hMonth = eval(hmS.substring(0, hmS.indexOf(' ')));
	var hYear = hmS.substring(hmS.indexOf(' ')+1, hmS.length);
	return  ' ' + getHebDayLetter(hDay) + ' ' + hebMonth[hMonth+1] + ' ' + getHebrewYear(hYear) + ' ';
	//document.write(getHebDayLetter(hDay) + ' ' + hebMonth[hMonth+1] + ' ' + getHebrewYear(hYear));
}




$(document).ready(function(){
		$('#sidebar1 .lamp').lavaLamp({
			speed: 300
		});
		
		
		
		$('#DedicationContent').evenIfHidden( function(element) {
		 // alert( element.height() );
		  var ContentHeight = element.height()
		  var boxHeight = $('#DedicationBoxInner').height()
		  
			if (ContentHeight > boxHeight) {
				$('#DedicationBoxInner').height(boxHeight-7);	
				$('<div class="more"><img src="http://www.davidbu.com/images/1.gif" style="border-style:none; width:1px; height:1px;" /><img src="http://www.davidbu.com/images/2.gif" style="border-style:none; width:1px; height:1px;" /></div>').insertAfter('#DedicationBoxInner');
				
				
				$("#DedicationBox").mouseover(function(){
					$("#DedicationBox").addClass("showAll");
					$('#DedicationBoxInner').css('height','auto');
					$('.more').hide();
					})
				.mouseout(function(){
					$("#DedicationBox").removeClass("showAll");
					$('#DedicationBoxInner').css('height',boxHeight-7);
					$('.more').show();
					});				
			}

			
			});
		

});

