  $(document).ready( function() {

    $('#menuMain img').hover( function() {
      newsrc = $(this).attr('title');
      $(this).attr('src', 'images/menu/hover-' + newsrc + '.png');
    }, function() {
      newsrc = $(this).attr('title');
      $(this).attr('src', 'images/menu/' + newsrc + '.png');
    });

    $('.valign').each( function() {
        pheight = $(this).parent().height();
        theight = $(this).height();
        center = pheight/2 - theight/2;
        $(this).css('margin-top', center + 'px'); 
//        alert(pheight + ', ' + theight + ', ');
    });
//    $('#article .quote').each(function() {
//	var txt = $(this).find('p').contents().filter( function() { return (this.nodeType === 3); });
//	txt.first()[0].innerHTML = txt.first()[0].innerHTML.substr(1);
//	txt.last()[0].innerHTML = txt.last()[0].innerHTML.substring(0, -1);
//	txt.first().before('<span>&ldquo;</span>');
//	txt.last().after('<span>&rdquo;</span>');
//    });

//    $('ul#gallery').parent().after('<ul id="gallery-thumbs"></ul>');
//    $('ul#gallery li').each( function() {
//alert('registered');
//	img = $(this).find('img').attr('src').split('.') || new Array('', '');
//	ext = img.pop();
//	img.join('.');
//	$('#gallery-thumbs').append('<li><img src="'+img+'-thumb.'+ext'" /></li>');
//    });

  });
