
$('document').ready(function(){
    $("pre.htmlCode").snippet("html",{style:'emacs'});
    $("pre.phpCode").snippet("php",{style:'emacs'});
    $("pre.sqlCode").snippet("sql",{style:'emacs'});
    $("pre.javaCode").snippet("java",{style:'emacs'});
    $("pre.javascriptCode").snippet("javascript",{style:'emacs'});

    $('#content p img, .img').wrap('<div class="imageDecorator" />');

    $('nav a').mouseover(function(){
       $(this).css('line-height','60px');
       $(this).parent().css('height','74px');
    });
    $('nav a').mouseout(function(){
       $(this).css('line-height','');
       $(this).parent().css('height','');
    });


});


function insertStatsData() {
    var stats = '<script type="text/javascript" src="http://stats.tom000.info/js/stats.js"></script>\n';
    stats+= '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>\n';
    stats+= '<script type="text/javascript">\n'+
                'var _gaq = _gaq || [];\n'+
                '_gaq.push([\'_setAccount\', \'UA-430581-4\']);\n'+
                '_gaq.push([\'_setDomainName\', \'.tom000.info\']);\n'+
                '_gaq.push([\'_trackPageview\']);'+
                '(function() {\n'+
                'var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n'+
                'ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n'+
                'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n'+
                '})();\n'+
            '</script>\n';
    $('body').append(stats);
}
