
$(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:18%;');
		$('#footerClients').attr('style', 'width:18%;');
		$('#footerCompany').attr('style', 'width:17%;right:17%;');
		$('#footerCooperate').attr('style', 'width:17%;left:20%;');
		$('#footerServices ul li').attr('style', 'width:99%;');
	}
	else
	{
		$("#footerServices").attr('style', 'width:31%;');
		$('#footerClients').attr('style', 'width:14%;');
		$('#footerCompany').attr('style', 'width:14%;right:14%;');
		$('#footerCooperate').attr('style', 'width:14%;left:16%;');
		$('#footerServices ul li').attr('style', 'width:50%;');
	
	
	
	}

});

function show_width()
{
	width=$("body").width();
	if ( width < 1280 )
	{
		$("#footerServices").attr('style', 'width:18%;');
		$('#footerClients').attr('style', 'width:18%;');
		$('#footerCompany').attr('style', 'width:17%;right:17%;');
		$('#footerCooperate').attr('style', 'width:17%;left:20%;');
		$('#footerServices ul li').attr('style', 'width:99%;');
	}
	else{
		$("#footerServices").attr('style', 'width:31%;');
		$('#footerClients').attr('style', 'width:14%;');
		$('#footerCompany').attr('style', 'width:14%;right:14%;');
		$('#footerCooperate').attr('style', 'width:14%;left:16%;');
		$('#footerServices ul li').attr('style', 'width:50%;');
	}
}


/*
$(document).ready(function(){
$("div.topmenu").mouseenter(function(){
      $('.topmenu ul li').hover(							  
        function() {
            $(this).addClass("active");
           $(this).find('ul').stop(true, true);
            $(this).find('ul').slideDown(200);
        },
        function() {
            $(this).removeClass("active");
			$(this).find('ul').stop(true, true);
            $(this).find('ul').slideUp(100);
        }
    );
    }).mouseleave(function(){
      $('.topmenu ul li').hover(							  
        function() {
            $(this).addClass("active");
           $(this).find('ul').stop(true, true);
            $(this).find('ul').slideDown(200);
        },
        function() {
            $(this).removeClass("active");
			$(this).find('ul').stop(true, true);
            $(this).find('ul').delay(1000).slideUp(100);
        }
    );
    });

});
*/

/*

$(document).ready(function(){

	$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
	
	$("ul.topnav li span").click(function() { //When trigger is clicked...
		
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() { 
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});

}); 
*/

/*
$(document).ready(function(){	
    $('.topmenu ul li').hover(
        function() {
            $(this).addClass("active");
           $(this).find('ul').stop(true, true);
            $(this).find('ul').slideDown(200);
        },
        function() {
            $(this).removeClass("active");
			$(this).find('ul').stop(true, true);
            $(this).find('ul').slideUp(100);
        }
    );
});

*/
