
$(document).ready(function(){
    $('.topMenu li').hover(							  
        function() {
					$(this).addClass("active");
					$(this).find('.subMenu').stop(true, true);
					$(this).find('.subMenu').slideDown(200, function(){
						var p = $(this).parent();
						if (p[0].id == 'first')
							return;
						
						if (!p.activeWidth || p.activeWidth == 0){
							this.activeWidth = this.offsetWidth;
						}
						
						$('div[class=bot]',p).animate({width:this.activeWidth-7}, 10);
						$('a[class=sub]',p).animate({width:this.activeWidth-29}, 200);
					});
        },
        				function() {
					$(this).removeClass("active");
					$(this).find('.subMenu').stop(true, true);
					$(this).find('.subMenu').hide();
					

        }
    );
});
$(document).ready(function footerServicesWidth(){
	width=$("body").width();
	if (width < 1280)
	{
		$("#footerServices").attr('style', 'width:22%;');
		$('#footerClients').attr('style', 'width:22%;');
		$('#footerCompany').attr('style', 'width:20%;right:20%;');
		$('#footerCooperate').attr('style', 'width:20%;left:23%;');
		$('#footerServices ul li').attr('style', 'width:99%;');
	}
	else
	{
		$("#footerServices").attr('style', 'width:35%;');
		$('#footerClients').attr('style', 'width:18%;');
		$('#footerCompany').attr('style', 'width:18%;right:14%;');
		$('#footerCooperate').attr('style', 'width:14%;left:20%;');
		$('#footerServices > ul > li').attr('style', 'width:50%;');
		$('#footerServices ul li li').attr('style', 'width:100%;');
	}
	if( $("#screen").height() < '95')
	{
	$("#screenShow").hide();
	}
	$('#footerServices >ul > li').slice(-2, 3).css('clear', 'both');

});

function show_width(){
	width=$("body").width();
	if ( width < 1280 )
	{
		$("#footerServices").attr('style', 'width:22%;');
		$('#footerClients').attr('style', 'width:22%;');
		$('#footerCompany').attr('style', 'width:20%;right:20%;');
		$('#footerCooperate').attr('style', 'width:20%;left:23%;');
		$('#footerServices ul li').attr('style', 'width:99%;');
	}
	else{
		$("#footerServices").attr('style', 'width:35%;');
		$('#footerClients').attr('style', 'width:18%;');
		$('#footerCompany').attr('style', 'width:18%;right:14%;');
		$('#footerCooperate').attr('style', 'width:14%;left:20%;');
		$('#footerServices > ul > li').attr('style', 'width:50%;');
		$('#footerServices ul li li').attr('style', 'width:100%;');
	}
	if( $("#screen").height() < '95')
	{
	$("#screenShow").hide();
	}	
	else
	{
	$("#screenShow").show();
	}
}
$(window).resize(show_width); 

$('.menuTabUL ul li a').live('click', function() {
	$(this).closest("tr").find('.menuTabUL ul li a').removeClass('activeTab');
	var str = this.className;
	$(this).addClass('activeTab');
	$(this).closest("tr").find('.fragmentIndexRubric').hide();
	$(this).closest("tr").find('#'+str).fadeIn('slow');
});

$(document).ready(function(){
    $('.nav-left div a').click(function(){
    	if($(this).closest("li").attr("class") == "sel")
    		return false;
		$('.nav-left ul').slideUp(300 , function(){
			$('.nav-left > li').removeClass("sel");	
		});	
		$(this).closest("li").find("ul").slideDown(300, function(){
			$(this).closest("li").addClass("sel");
		});
		
	});							  
    $('ul.nav-left li.sel ul').show();
});

