try{$(document).ready(function(){$('.username').focus(function(){$('.info').html(info_username);});$('.password').focus(function(){$('.info').html(info_password);});$('.email').focus(function(){$('.info').html(info_email);});$('.confEmail').focus(function(){$('.info').html(info_confEmail);});$('.captcha').focus(function(){$('.info').html(info_captcha);});$('.terms').focus(function(){$('.info').html(info_terms);});$('.confEmail').bind("cut copy paste",function(e){e.preventDefault();});$('.email').keyup(function(e){var needle=$(this).val().split("@");index=indexOf.call(yahooArr,needle[1]);var sugg="";if(index!==-1){sugg="yahoo.com";}else{index=indexOf.call(gmailArr,needle[1]);if(index!==-1){sugg="gmail.com";}else{index=indexOf.call(hotmailArr,needle[1]);if(index!==-1){sugg="hotmail.com";}else{index=indexOf.call(liveArr,needle[1]);if(index!==-1){sugg="live.com";}}}}
if(sugg!=="")
{var r=confirm("هل تقصد:"+needle[0]+"@"+sugg+"?");if(r===true){$(this).val(needle[0]+"@"+sugg);}}});$("form").submit(function(eventObj){$(this).append('<input type="hidden" name="landing_id" value="'+bg+'" /> ');$(this).append('<input type="hidden" name="ref_id" value="'+ref+'" /> ');$(this).append('<input type="hidden" name="b_id" value="'+bid+'" /> ');$(this).append('<input type="hidden" name="c_name" value="'+aid+'" /> ');return true;});$('.register').click(function(){var submit=true;$('#error').html("");if($('#username').val()===""){submit=false;$('#error').html($('#error').html()+general_error_username+"<br/>");}
if($('#password').val()===""){submit=false;$('#error').html($('#error').html()+general_error_password+"<br/>");}
if($('#email').val()===""){submit=false;$('#error').html($('#error').html()+general_error_email+"<br/>");}
if($('#confEmail').val()===""){submit=false;$('#error').html($('#error').html()+general_error_confEmail+"<br/>");}
if($('#hcaptcha_input').val()===""){if($('#google').val()!=="true"){submit=false;$('#error').html($('#error').html()+general_error_captcha+"<br/>");}}
if(!$('#terms').is(':checked')){submit=false;$('#error').html($('#error').html()+general_error_terms+"<br/>");}
if(submit){$('.form').submit();}});$('#fbregister').click(function(){var submit=true;$('#fberror').html("");if($('#fbusername').val()===""){submit=false;$('#fberror').html($('#fberror').html()+general_error_username+"<br/>");}
if($('#fbpassword').val()===""){submit=false;$('#fberror').html($('#fberror').html()+general_error_password+"<br/>");}
if($('#fbemail').val()===""){submit=false;$('#fberror').html($('#fberror').html()+general_error_email+"<br/>");}
if(!$('#fbterms').is(':checked')){submit=false;$('#fberror').html($('#fberror').html()+general_error_terms+"<br/>");}
if(submit){$('#fbform').submit();}});$(".reg-video").YouTubePopup({autoplay:1});});}catch(e){alert("::حدث خطأ , يرجى المحاولة لاحقاً:: ");}