$(document).ready(function () {
    //BEGIN FLASH DETECTION
    var flashVersion = swfobject.getFlashPlayerVersion();

    //Uncomment the following line to reset the cookie.  FOR TESTING ONLY
    //$.cookie('EQTRemind', 'true');  
    if ($.readCookie('remind') == "true" || $.readCookie('remind') == null) {
        //If the reminder cookie is true then proceed 
        //flashVersion.major = 7;
        //flashVersion.release = 10;
        if (flashVersion.major <= 9 && flashVersion.release < 155) {
            //If the Flash version is less than our specified version then proceed
            $('#dnsCheckbox').css('display', 'block');
            $('#noFlash').css('display', 'block');
        }
    }

    if ($.readCookie('remind') == 'false') {
        $('#noFlash').css('display', 'block');
        $('#noFlash a img').attr('src', '/images/noFlashStill.jpg');
    }

    $('#dnsCheckbox a').hover(function () {
        if ($('#dnsCheckbox a img').hasClass('unchecked')) {
            $('#dnsCheckbox a img').attr('class', 'checked');
            $('#dnsCheckbox a img').attr('src', '/images/dns_check.png');
        } else {
            $('#dnsCheckbox a img').attr('class', 'unchecked');
            $('#dnsCheckbox a img').attr('src', '/images/dns_uncheck.png');
        }
    });

    $('#dnsCheckbox a').click(function () {
        $('#noFlashContainer').fadeOut('fast', function () {
            $('#noFlash a img').attr('src', '/images/noFlashStill.jpg');
            $('#dnsCheckbox').css('display', 'none');
        }).fadeIn('fast');
        $.setCookie('remind', 'false', { duration: 30, path: '', domain: '', secure: false });
    });
}); 
// END FLASH DETECTION
