$(document).ready(function(){
    leftHeaders();

    // zebra striping (with mouseover) on tables
    $("#wdcontent table:not([id][class]) tr:even").addClass("even");
    $("#wdcontent table:not([id][class]) tr:odd").addClass("odd");
    
    $("#wdcontent table:not([id][class]) tr:even").mouseover(function() {
        $(this).addClass("evenMO");
    })
    $("#wdcontent table:not([id][class]) tr:odd").mouseover(function() {
        $(this).addClass("oddMO");
    })
    
    $("#wdcontent table:not([id][class]) tr:even").mouseout(function() {
        $(this).removeClass("evenMO");
    })
    $("#wdcontent table:not([id][class]) tr:odd").mouseout(function() {
        $(this).removeClass("oddMO");
    })    
    
});



function leftHeaders() {
     $('#wdleft h1:not(.flash-replaced)')
           .flash(
        { 
            src: '/wd/wdsite/scripts/augie.swf', 
            flashvars: { 
                css: [
                    '* { color: #1b1e21; }',
                    'a { color: #009ad7; text-decoration: none; }',
                    'a:hover { color: #5e5e5e; text-decoration: underline; }'
                ].join(' ')
            },
            wmode: 'transparent',
            bgcolor: '#ffffff'
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));				
                
        }
    );
    $('#wdleft h2:not(.flash-replaced)')
           .flash(
        { 
            src: '/wd/wdsite/scripts/augie.swf', 
            flashvars: { 
                css: [
                    '* { color: #009ad7; }',
                    'a { color: #009ad7; text-decoration: none; }',
                    'a:hover { color: #5e5e5e; text-decoration: underline; }'
                ].join(' ')
            },
            wmode: 'transparent',
            bgcolor: '#ffffff'
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
                
        }
    );
    
    $('#wdleft h3:not(.flash-replaced)')
           .flash(
        { 
            src: '/wd/wdsite/scripts/augie.swf', 
            flashvars: { 
                css: [
                    '* { color: #009ad7; }',
                    'a { color: #009ad7; text-decoration: none; }',
                    'a:hover { color: #5e5e5e; text-decoration: underline; }'
                ].join(' ')
            },
            wmode: 'transparent',
            bgcolor: '#ffffff'
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
                
        }
    );
    

}

function rightHeaders() {
    $('#wdright h1:not(.flash-replaced)')
           .flash(
        { 
            src: '/wd/wdsite/scripts/augie.swf', 
            flashvars: { 
                css: [
                    '* { color: #009ad7; }',
                    'a { color: #009ad7; text-decoration: none; }',
                    'a:hover { color: #5e5e5e; text-decoration: underline; }'
                ].join(' ')
            },
            wmode: 'transparent',
            bgcolor: '#ffffff'
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
                
        }
    );
    
}