
    var tab = 1;
    var clicked = 0;
    var overed = 0;
    
    $(document).ready(function() {
        $('#tab-menu a').click(function() {
            if(clicked == 0) {
                clicked = 1;
            }
            else {
                clicked = 2;
            }
            $('#tab-menu a').attr('class', 'menu-dashed');
            $(this).attr('class', 'selected-a');
            var this_id = this.id;
            
            if(clicked == 1) {
                $('#tab-' + tab + '-content').fadeOut(150, function() {
                    $('#' + this_id + '-content').fadeIn(300, function() {
                        tab = this_id.substr(4, 1);
                        clicked = 0;
                    });
                });
            }
        });
    });
    
    function goToTop() {
        $('html,body').animate({scrollTop:0}, 'slow');
        return false;
    }
