﻿function showDiv(divName) {
    var myDiv = document.getElementById(divName);
    myDiv.style.display = "block";
}
function hideDiv(divName) {
    var myDiv = document.getElementById(divName);
    myDiv.style.display = "none";
}

$(function() {
    

    $(window).scroll(function() {
        if ($(this).scrollTop() != 0) {
            $('#toTop').fadeIn();
        } else {
            $('#toTop').fadeOut();
        }
    });

    $('#toTop').click(function() {
        $('body,html').animate({ scrollTop: 0 }, 800);
    });

    $('.comment_wrapper').each(function() {

        var me = $(this);

        me.qtip({
            content: me.next().html(),
            position: {
                corner: {
                    target: 'leftMiddle',
                    tooltip: 'rightBottom'
                },
                adjust: {
                    screen: true
                }
            },
            style: {
                name: 'blue',
                tip: {
                    corner: 'rightBottom'
                },
                border: {
                    width: 1
                },
                width: {
                    min: 220,
                    max: 500
                }
            }
        });

    });

});
