﻿$(document).ready(function() {

    $('#watchButton').hover(function() { $(this).attr('src', 'images/homePlay_hover.png') },
                        function() { $(this).attr('src', 'images/homePlay.png') });
    
    // Added for new webtour button.  12/21/2010.  BD.
    $('#watchWebTourButton').hover(function() { $(this).attr('src', 'images/takewebtour-hover.png') },
                               function() { $(this).attr('src', 'images/takewebtour.png') });

    // Added for new ConnectToYourIssues button.  09/19/2011.  BD.
    $('#connectToYourIssuesButton').hover(function() { $(this).attr('src', 'images/ConnectToYourIssues_hover.png') },
                               function() { $(this).attr('src', 'images/ConnectToYourIssues.png') });

    $('#learnMoreButton').hover(function() { $(this).attr('src', 'images/homeLearnMore_hover.png') },
                            function() { $(this).attr('src', 'images/homeLearnMore.png') });
                            
    $('#launchButton').hover(function() { $(this).attr('src', 'images/launchButton_hover.jpg') },
                         function() { $(this).attr('src', 'images/launchButton.jpg') });
                         
    $('#downloadFG').hover(function() { $(this).attr('src', 'images/download_big_hover.gif') },
                       function() { $(this).attr('src', 'images/download_big.gif') });
                       
    $('#downloadAll').hover(function() { $(this).attr('src', 'images/download_med_hover.gif') },
                        function() { $(this).attr('src', 'images/download_med.gif') });
                        
    $('.pdfDownload').hover(function() { $(this).attr('src', 'images/download_sm_hover.gif') },
                        function() { $(this).attr('src', 'images/download_sm.gif') });
                        
    $('.giveFeedbackButton').hover(function() { $(this).attr('src', 'images/addFeedback_hover.jpg') },
                               function() { $(this).attr('src', 'images/addFeedback.jpg') });

    $('.prevSlide').hover(function() {
        if ($(this).attr('src') != 'images/previousSlide_dis.jpg') {
            $(this).attr('src', 'images/previousSlide_hover.jpg')
        }
        else
        { $(this).css('cursor', 'default') }
    }, function() {
        if ($(this).attr('src') != 'images/previousSlide_dis.jpg') {
            $(this).attr('src', 'images/previousSlide.jpg')
        }

    });

    $('.nextSlide').mouseover(function() {
        if ($(this).attr('src') != 'images/nextSlide_dis.jpg') {
            $(this).attr('src', 'images/nextSlide_hover.jpg')
        }
        else
        { $(this).css('cursor', 'default') }

    })


    $('.nextSlide').mouseout(function() {
        if ($(this).attr('src') != 'images/nextSlide_dis.jpg') {
            $(this).attr('src', 'images/nextSlide.jpg')
        }

    });

    $('.hoverToBlue').hover(
        function() {
            origColor = $(this).css('color');
            $(this).css('color', '#009ddc');
        }, function() {
            $(this).css('color', origColor)
        });

    $('.hoverToGold').hover(
        function() {

            origColor = $(this).css('color');
            $(this).css('color', '#FFD204');
        }, function() {
            $(this).css('color', origColor)
        });


    $('.hoverToGreen').hover(
        function() {
            origColor = $(this).css('color');
            $(this).css('color', '#4F8C2D');
        }, function() {
            $(this).css('color', origColor)
        });

    $('.hoverLineToBlue').hover(
    function() {
        origLineColor = $(this).css('border-bottom-color');
        $(this).css('border-bottom-color', '#0357ab');
    }, function() {
        $(this).css('border-bottom-color', origLineColor)
    }
    );

    $('.hoverChildLinkToGreen').hover(function() {
        childLink = $(this).children('a');
        origColor = childLink.css('color');
        childLink.css('color', '#4F8C2D');
    }, function() {
        childLink.css('color', origColor)
    });
});
