var tmp_negeso_menu_item_to_close = null;

function checkHover() {
	var $=jQuery;
	if (tmp_negeso_menu_item_to_close) {
		tmp_negeso_menu_item_to_close
			.removeClass('over')
			.find('td')
			.removeClass('over');
		// Hiding ULs in reverse order - special for IE. Try to change to tmp_negeso_menu_item_to_close.find('ul').hide() and see what it will be in the IE
		var uls=tmp_negeso_menu_item_to_close.find('ul').get();
		for (var i=0; i<uls.length; i++)
			$(uls[uls.length-1-i]).hide(); //.fadeOut('fast');
		tmp_negeso_menu_item_to_close = null;
	} //if
} //checkHover

function negesoMenu(ul_id) {
	var $=jQuery;
	$('#'+ul_id+' td:not([onclick])').hover(
		function() {
			checkHover();
			$(this).addClass('over');
			$(this).find('> table').show();//slideDown('fast');
		}, 
		function() {
			tmp_negeso_menu_item_to_close = $(this);
			setTimeout("checkHover()",300);
		}
	).each(function(i,o){
		var anchor;
		if (anchor=$(this).find('> a').get(0)) {
			$(o).bind('click',function(e){var ev=e||window.event||window.e; ev.cancelBubble=true; window.location.href=$(anchor).attr("href")});
			anchor.onclick=function(){return false;}
		} else {
			o.onclick=function(e){var ev=e||window.event||window.e; ev.cancelBubble=true;}
			$(o).css({'cursor':'default'});
		}
	})
}

function positiontLi(){
if ($("#tab1")[0]){
   	if ($("#tab1")[0].clientWidth >625 ){
		$("#tab1 td.first").css("padding-left",0); 
		$("#tab1 td#fir").css("display","block"); 		
	}
}
if ($("#tab2")[0]){
	if ($("#tab2")[0].clientWidth >625 ){
		$("#tab2 td.first").css("padding-left",0); 
		$("#tab2 td#fir").css("display","block"); 		
	}
}
if ($("#tab3")[0]){
	if ( $("#tab3")[0].clientWidth>625 ){
		$("#tab3 td.first").css("padding-left",0); 
		$("#tab3 td#fir").css("display","block"); 	
	}
}
}
