$(document).ready(function(){$(".default-value").each(function(){var a=this.value;$(this).focus(function(){if(this.value==a){this.value="";$(this).css("color","#333333")}});$(this).blur(function(){if(this.value==""){this.value=a;$(this).css("color","#999999")}})});$("#reg_form").submit(function(){var b=$("#reg_form #email").val();var a=$("#reg_form #webinar_name").val();if(b=="name@company.com"||b==""){$("#reg_form").after('<div class="hint error" style="visibility: visible; display: block;"><span class="close">X</span><span class="msg">Sorry, we need your work email address.</span><div class="example" style="display: block; ">eg. yourname@yourcompany.com</div></div>')}else{$.ajax({dataType:"text",data:{method:"store",email:b,webinar_name:a},jsonp:"jsonp_callback",url:"/webinars/webinar_submit.php",success:function(c){switch(c){case"SUCCESS":$("#register").html('<p class="register_done">Thanks for Signing up!</p>');$(".hint.error").remove();default:if(c=="ERROR-NO-INFO-SPECIFIED"){$("#reg_form").after('<div class="hint error" style="visibility: visible; display: block;"><span class="close">X</span><span class="msg">Sorry, we need your work email address.</span><div class="example" style="display: block; ">eg. yourname@yourcompany.com</div></div>')}if(c=="ERROR-INVALID-EMAIL"){$("#reg_form").after('<div class="hint error" style="visibility: visible; display: block;"><span class="close">X</span><span class="msg">Sorry, the email address you proved was invalid.</span><div class="example" style="display: block; ">eg. yourname@yourcompany.com</div></div>')}break}}});return false}return false});$(".link_embed").toggle(function(){element=$(this).attr("rel");$("#"+element).slideDown();return false},function(){element=$(this).attr("rel");$("#"+element).slideUp();return false});$(".hint .close").click(function(){$(".hint").fadeOut("fast")})});
