$(function() {

    $('table.MSFeatureTable tr:nth-child(even)').css({
        backgroundColor: '#dddddd'
    });

    $('#MSNav'+MSNavTab).addClass('MSNavTabOn');

    $('a.MSNavTab').hover(function() {
        $(this).stop().animate({ marginLeft: '0px' },200,'swing');
    }, function() {
        if ( $(this).hasClass('MSNavTabOn') )
            return;

        $(this).stop().animate({ marginLeft: '-20px' },200,'swing');
    });

    $('#MSGalleryThumbs img').click(function() {
        var thumbNo = $(this).attr('src').match(/gallery([0-9])-thumb\.jpg/);
        var offset = ( parseInt(thumbNo[1]) * 630 ) - 630;

        $('#MSGalleryReelI').stop().animate({ marginLeft: '-'+offset+'px' }, 400);
    }).hover(function() {
        $(this).stop().animate({ opacity: 0.5 }, 300);
    }, function() {
        $(this).stop().animate({ opacity: 1.0 }, 300);
    });


});

