/**
 * @author Laurent Zuijdwijk
 * @copyright 2009 Flexr Web Solutions
 *
 */
window.onload = function(){
    $('.post:first').show();
    makeMenu();
 }

var activePageItem;

function makeMenu(){
    $('h2.postTitle').appendTo('#pageMenu');
    $('h2.postTitle:first').css('color', '#ff6600');
    activePageItem = $('h2.postTitle:first')[0];
    $('h2.postTitle').bind("click", function(){
        $('.post').hide();
        $('#post-' + $(this).attr('id')).show();
        $('h2.postTitle').css('color', '#99908C');
        $(this).css('color', '#ff6600');
    	activePageItem =$(this)[0];
    });
    $('h2.postTitle').mouseover( function(){
            $(this).css('color', '#ff6600');
     });
   $('h2.postTitle').mouseout( function(){
    	if(activePageItem != $(this)[0])
            $(this).css('color', '#99908C');
     });
 }
