(typeof(ET) != 'undefined') || (ET = {}); ET.Community = ET.Community || {}; ET.Community.EESignUp = ET.Community.EESignUp || {}; ET.Community.EESignUp.Config = ET.Community.EESignUp.Config || {}; ET.Community.EESignUp.Config.SingleCacheServer = ET.Community.EESignUp.Config.SingleCacheServer || 'http://cns2.ef-cdn.com'; ET.Community.EESignUp.Config.SiteVersion = ET.Community.EESignUp.Config.SiteVersion || '18-1'; ET.Community.EESignUp.htmlTemplate = ET.Community.EESignUp.htmlTemplate || ( '
' +'喜欢我们 的视频课?
' +'现在免费注册,每天定时发送到你邮箱哦!
' +'
' +'
 请输入正确格式的电邮
 

' +'
' +'
' +'
' ); ET.Community.EESignUp.Load = ET.Community.EESignUp.Load || ( function ($) { var cssFileMergeHandler = 'http://cns2.ef-cdn.com/community/widgets/eesignup/mergestylefile/?siteversion=' + ET.Community.EESignUp.Config.SiteVersion; var cssLink = document.createElement('link'); with(cssLink) { href = cssFileMergeHandler; rel = 'stylesheet'; type = 'text/css'; }; if (navigator.appName == 'Microsoft Internet Explorer') { if (parseInt(navigator.appVersion.replace(/.*?MSIE\s([\d\.]+).*/ig,"$1")) <= 6) { document.execCommand("BackgroundImageCache", false, true); } } document.getElementsByTagName('head')[0].appendChild(cssLink); document.write(ET.Community.EESignUp.htmlTemplate); var container = jQuery('.eesignup'); var emailContainer = container.find('.eesignup-input'); var frm = $("form[name='eesignupForm']"); var email = frm.find(":input[name='em']"); function OnFocus() { container.removeClass('eesignup-error'); emailContainer.removeClass().addClass('eesignup-input-active'); if (email.val() == email.attr('txt')) { email.val(''); }; email.removeClass(); email.select(); }; function OnBlur() { container.removeClass('eesignup-error'); emailContainer.removeClass().addClass('eesignup-input'); if (email.val() == '') { email.val(email.attr('txt')); } if (email.val() == email.attr('txt')) { email.addClass('eesignup-gray'); } else { email.removeClass(); } }; email.attr('txt', email.val()).focus( OnFocus ).blur( OnBlur ); frm.submit(function () { container.removeClass('eesignup-error'); var val = email.val(); var pattern = /^[^@\s]+@[A-Za-z0-9-\u4e00-\u9fa5]+(?:\.[A-Za-z0-9-\u4e00-\u9fa5]+)+$/; if (pattern.test(val)) { return true; } else { if (email.val() == email.attr('txt')) { email.val(''); }; email.removeClass(); container.addClass('eesignup-error'); return false; } }); } ); if (typeof(jQuery) != 'undefined') { ET.Community.EESignUp.Load(jQuery); };