$(function() {
	
	var currentPath = window.location.pathname;
    var newPath = currentPath.replace("/", "/en/");


    $("#en").attr("href", newPath);
	

    var offset = $("#en").offset();
    var topPadding = 15;

    $(window).scroll(function() {
    
        if ($(window).scrollTop() > offset.top) {
        
            $("#en").stop().animate({
            
                marginTop: $(window).scrollTop() - offset.top + topPadding
            
            });
        
        } else {
        
            $("#en").stop().animate({
            
                marginTop: 0
            
            });
        
        }
        
            
    });
});


