$(function() {
	
	
	var countryCode = $("html").attr("lang"); 
	$("body").addClass(countryCode + '-hook');

	$('.sf-menu').superfish({animation: {opacity:'show',height:'show'},speed: 'fast', onBeforeShow: function() { $(this).width(800);} });
	$('.segment-menu div:nth-child(odd)').addClass('odd')
	$('.segment-menu div:nth-child(even)').addClass('even')

	$(".segment-menu div, .country-office-listing .vcard").equalHeights();
	$('.jb').insertAfter('.article h1:first');
	
	 $(".build").each(function(){ $(this).twmod(); });

	if ($(".segment-menu div").length % 2 == 1) {
		$(".segment-menu div:last").css('border-bottom', '0 none');
	}
	
	$('.setWidth').each(function(){
		var boxWidth = $(this).find('span').width();
		$(this).width(boxWidth);
	})


	$('.datefield').datepicker({changeMonth: true, changeYear: true});
	$('.ico.calendar').click(function() {$(this).prev().datepicker('show');});
		
	$(".show-hide").click(function(){$(this).parent().next().slideToggle("fast");$(this).toggleClass("active");}); 
 
    var max = 0;
    $("#contact-form label").each(function(){
        if ($(this).width() > max)
            max = $(this).width();    
    });
    $("#contact-form label").width(max);
 

$('.table tr:nth-child(odd)').addClass('odd');
$('.table tr:nth-child(even)').addClass('even');
	
    	if ($.browser.msie && $.browser.version <= 6 )
			$('.top-level-service-list li, .results li').hover(
				function() {$(this).addClass('hovered');}, 
				function() {$(this).removeClass('hovered')}
      		);
});




