$(function () {
    /*
    $('#lang-switch-btn, .actual_lang').hover(function () {
        $('.actual_lang').css('text-decoration','underline');
    }, function () {
        $('.actual_lang').css('text-decoration','none');
    });
    
    $('#lang-switch-btn, .actual_lang').click(function () {
        if ($('#langswitch').hasClass('bb')) {
            $('.other_lang').css('display','none');
            $('#langswitch').removeClass('bb');
        } else {
            $('.other_lang').css('display','block');
            $('#langswitch').addClass('bb');
        }
    });
    */
    $('#search-people').DefaultValue(__("priezvisko"));
    
    animateInfo();
    
    // $('#orangetext p').hide();
    // $('#orangetext p:eq(0)').show();
    // 
    // var position = 0;
    // var count = $('#orangetext p').length;
    // setInterval(function () {
    //     $('#orangetext p:eq('+position+')').fadeOut(function () {
    //         position++;
    //         if (position > (count-1)) {
    //             position = 0;
    //         }
    //             
    //         $('#orangetext p:eq('+position+')').fadeIn();
    //     });
    //         
    // },5000)
    
});

function animateInfo() {
    var height2 = $('#orangetext-content').innerHeight();
    var height1 = $('#orangetext').innerHeight();
    var height = height2 - height1 + 5;
    
    var speed = height*300;
    
    $('#orangetext-content').animate({
        'top': '-'+height+'px'
    },speed,'linear', function () {
        $('#orangetext-content').animate({
            'top': '0px'
        },speed,'linear', animateInfo)
    });
}

