var calendar = {
	type: 'news',
	language: 'eng',
	
	load: function(month, year) {
		$('#calendar').load('/' + this.language + '/' + this.type + '/calendar/', {month: month, year: year});
	}
}

function subscribe(value) {
	
	$.getJSON('/news/subscribe/', {email: $('#subscribe [name="email"]').val(), value: value},
		function(d) {
			$('#subscribe #display')
				.html(d.message)
				.slideDown()
				.delay(1500)
				.slideUp();
			
	});
	
	return false;
}

window.onerror = function(e){
	  return true;
}

<script>
$('#top-menu li').each(function() {
	$(this).hover(
		function() {
			$(this).children('a').addClass('sel');
			$(this).find('.childs').show();
		},
		function() {
			var a = $(this).children('a');
			if (a.attr('sel') != 1)	a.removeClass('sel');
			$(this).find('.childs').hide();
		}
	);
});
</script>

function highlight_menuitem(id) {
	curpage	= document.getElementById(id);
	curpage.children('a').addClass('sel');
}
