function imageHover(imageName) {
	document.getElementById(imageName+'-img').src = imagesDir + '/'+imageName+'_h.png';
}

function imageLeave(imageName) {
	document.getElementById(imageName+'-img').src = imagesDir + '/'+imageName+'.png';
}

var popularShow = 'posts';

function showPopular(listName) {
	if (popularShow != listName) {
		document.getElementById('sidebar-popular-'+listName+'-list').style.display = 'block';
		$('#sidebar-popular-'+listName+'-title').addClass('hover');	
		
		document.getElementById('sidebar-popular-'+popularShow+'-list').style.display = 'none';
		$('#sidebar-popular-'+popularShow+'-title').removeClass('hover');
		
		popularShow = listName;
	}
}

function mouseOverPopular(titleName) {
	if (titleName != popularShow) $('#sidebar-popular-'+titleName+'-title').addClass('hover');
}

function mouseLeavePopular(titleName) {
	if (titleName != popularShow) $('#sidebar-popular-'+titleName+'-title').removeClass('hover');
}

function checkLVDaily() {
	if (icpForm1994["fields_email"].value == "") {
		icpForm1994["fields_email"].focus();
		alert("The Email field is required.");
		return false;
	}
	return true;
}


$(document).ready(function(){

	$("#navbar-main li ul li:first-child").addClass('first');

	$("#navbar-main > ul > li").hover(
        function () {
        	if ($(this).has("ul").length) {
        		$("#navbar-main li ul").hide();	
        		$(this).children("ul").show();
        	}
        },function(){
	});

});