// JavaScript Document
			// Initialization, you can leave this here or move this somewhere else
			$(function(){
				$('ul.jd_menu').jdMenu({	onShow: loadMenu,
											onClick: onClickMenu 
											});
				$('ul.jd_menu_vertical').jdMenu({onShow: loadMenu, onClick: onClickMenu, onHide: unloadMenu, offset: 1, onAnimate: onAnimate});
			});

			function onAnimate(show) {
				//$(this).fadeIn('slow').show();
				if (show) {
					$(this)
						.css('visibility', 'hidden').show()
							.css('width', $(this).innerWidth())
						.hide().css('visibility', 'visible')
					.fadeIn('normal');
				} else {
					$(this).fadeOut('fast');
				}
			}

			var MENU_COUNTER = 1;
			function loadMenu() {
				if (this.id == 'dynamicMenu') {
					$('> ul > li', this).remove();
			
					var ul = $('<ul></ul>');
					var t = MENU_COUNTER + 10;
					for (; MENU_COUNTER < t; MENU_COUNTER++) {
						$('> ul', this).append('<li>Item ' + MENU_COUNTER + '</li>');
					}
				}
			}

			function unloadMenu() {
				if (MENU_COUNTER >= 30) {
					MENU_COUNTER = 1;
				}
			}

			// We're passed a UL
			function onHideCheckMenu() {
				return !$(this).parent().is('.LOCKED');
			}

			// We're passed a LI
			function onClickMenu() {
				//$('a', this).click(function(e){alert(e.target);});
				//alert($('a:eq(0)', this).attr('id'));
				if(undefined == $('a:eq(0)', this).attr('id')) $('a:eq(0)', this).click(openTab($('a:eq(0)', this).attr('i')));
				return true;
			}
			
			function openTab(i){
				$('div#usual2 ul li a:eq('+i+')').click();
			}
			function engleza(){
				location.href = '/lang/eng/';
			}
			function romana(){
				location.href = '/lang/rum/';
			}

function closediv() {
document.getElementById('menu1Container').style.visibility = 'hidden';
document.getElementById('container1').style.visibility = 'hidden';
document.getElementById('container2').style.visibility = 'hidden';
}
function opendiv() {
document.getElementById('menu1Container').style.visibility = 'visible'; 
document.getElementById('container1').style.visibility = 'visible';
}
function rezolutie() {
var wie = document.body.clientWidth;
 if (wie <= 1024) 
    { 
	document.getElementById('Romcarbon').setAttribute("className", "gabi"); 
	document.getElementById('Romcarbon').setAttribute("class", "gabi"); 
    }
}
function mic ()
	{ document.getElementById('menu1Container').style.visibility = 'hidden';
	  document.getElementById('menu2Container').style.visibility = 'visible';}
function mare ()
	{ document.getElementById('menu1Container').style.visibility = 'visible';
	  document.getElementById('menu2Container').style.visibility = 'hidden';}