$(function() {
    if($.browser.msie) {
        $('body *:not(#chromeframe)').remove();
        $('body').css('background', 'none').prepend('<h1>Sorry, I support only REAL browsers. IE is not a real browser, it\'s only a kid\'s toy ;)</h1>');
    }
    
    $('.content article').hide();
    
    $.fragmentChange(true);
    $(document).bind('fragmentChange.page', function() {
        $('.content article.current').removeClass('current').slideUp('fast');
        $('.content article.' + $.fragment().page).addClass('current').slideDown('fast');
        
        var nextA = $('.menu ul li a.' + $.fragment().page);
        $('.menu ul li a.current').add(nextA).toggleClass('current');
    });
    
    if($.fragment().page) {
        $(document).trigger('fragmentChange.page');
    } else {
        $.setFragment({page: $.fragment($('.menu ul li a:first').attr('href')).page});
    }
    
    $('.box .content .networks ul li a').hover(function() {
        var self = $(this);
        var tooltip = $('<div class="tooltip" style="display:none"/ >').text(self.text()).appendTo(self.parent('li'));
        tooltip.css({top: self.position().top + 80, left: self.position().left - 2}).fadeIn();
    }, function() {
        $(this).siblings('.tooltip').remove();
    });
});