﻿$(function () {
    if ($.browser.msie && $.browser.version < 8) {
        $('html,body').css('overflow-x', 'hidden');
    }

    $('.selectbox select').on('change', function () {
        $(this).parent().find('p').text($(this).find("option:selected").text());
    });

    // When the Email field receieves focus, remove the default text
    $("#EmailTextbox").focus(function () {
        if ($(this).val() == "YOUR EMAIL") {
            $(this).val("");
        }
    });

    // When the email field is blurred, if there's no value, show the default text again
    $("#EmailTextbox").blur(function () {
        if ($(this).val().length == 0) {
            $(this).val("YOUR EMAIL");
        }
    });
});      
