

$(document).ready(function() {
    $("#toggle-more").click(function () {
        $(".more-content").toggle();
    });
    $(".more-block").mouseleave(function () {
        $(".more-content").hide();
    });
    $(".more-content").mouseleave(function () {
        $(this).hide();
    });

    $("#toggle-lang").click(function () {
        $(".lang-more").toggle();
    });
    $(".lang-block").mouseleave(function () {
        $(".lang-more").hide();
    });
    $(".lang-more").mouseleave(function () {
        $(this).hide();
    });
});


/*
 * Z-index fix
 */
if ( $.browser.msie && parseInt($.browser.version, 10) < 8) {
    $(function() {
        var zIndexNumber = 10000;
        $('div').each(function() {
            $(this).css('zIndex', zIndexNumber);
            zIndexNumber -= 10;
        });
    });
}

$(function(){

    $('a[href*=#]').click(function() {

    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {

            var $target = $(this.hash);

            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');

            if ($target.length) {

                var targetOffset = $target.offset().top;

                $('html,body').scrollTop(targetOffset);

                return false;

            }

        }

    });

});

