"; } else if(!regex.test($('#real').val())) { message_error += "Please specify the email.
"; } } else if(typeof $('#facebook_id').val() !== 'undefined') { if($('#facebook_id').val() == '') { message_error += "Please input your email.
"; } } if ($('.txtdes').val() == "") { message_error += "Please specify the message.
"; } else if ($('.txtdes').val().length > 500) { message_error += "Please type your message here, limiting it to 500 characters or less..
"; } if ($('#g-recaptcha-response').val() == '') { message_error += captcha_error; } if ($('input#website').val().length != 0) { message_error += " "; } $('.btngraysubmit').hide(); if (message_error == '') { $('#loading_help_report').show(); $.ajax({ type: "POST", url: "https://www.youworkforthem.com/report-problem.php?action=process", data: $('#contact_help').serialize() }).done(function (msg) { resetcap_report(); if ($.trim(msg) != '' && isNaN(msg) == false) { $(window).scrollTop(0); setTimeout(function () { $('#loading_help_report').hide(); $('.contact-overlay').hide(); $('.btngraysubmit').show(); //console.log($(window).height()); var msg_report_successHieght = $('#msg_report_success').height(); var margintop = ($(window).height() / 2); margintop = margintop - (msg_report_successHieght / 2) - 22; if (margintop < 0) { margintop = 0; } $('#msg_report_success').css({"margin-top": margintop}); $('#msg_report_success').show(); $('#recap').val(0); }, 3000); setTimeout(function () { $('.main-contact-overlay').css({"display": "none"}); flg_report_overlay = 0; $('.' + main_class_display).css({"display": "block"}); if($('.list-main-container').length>=1){ $('.list-main-container').show(); } $('.contact-overlay').show(); $('#msg_report_success').hide(); $('.emailform').val(''); $('.txtdes').val(''); $('#compress_report').val(''); $('#inputfile_report').show(); $('#upload_status_report,#upload_file_report').hide(); }, 5000); //// end corect } else { // error $('#loading_help_report').hide(); $('.msg_boxs_error').html(msg); $('.msg_boxs_error').fadeIn('fast'); setTimeout(function () { $('.msg_boxs_error').hide(); $('.btngraysubmit').show(); }, 3000); } }); } else { // alert(message_error); $('#loading_help_report').hide(); $('.msg_boxs_error').html(message_error); $('.msg_boxs_error').fadeIn('fast'); setTimeout(function () { $('.msg_boxs_error').hide(); $('.btngraysubmit').show(); }, 3000); } }); $('.btngrayfaq').click(function () { $(this).find('a').removeClass('active'); window.open('https://help.youworkforthem.com/faq/'); }); $('body').bind("mousedown touchstart", function (e) { fla_touch = 0; }); $('body').bind("mousemove touchmove", function (e) { fla_touch = 1; }); $('body').bind("touchend", function (e) { var container = $(".contact-overlay"); if (!container.is(e.target) // if the target of the click isn't the container... && container.has(e.target).length === 0 && fla_touch == 0) // ... nor a descendant of the container { $('.main-contact-overlay').css({"display": "none"}); if($('.list-main-container').length>=1){ $('.list-main-container').show(); } flg_report_overlay = 0; $('#recap').val(0); $('.contact-overlay').show(); $('#msg_report_success').hide(); $('.emailform').val(''); $('.txtdes').val(''); $('#compress_report').val(''); $('#inputfile_report').show(); $('#upload_file_report').hide(); document.activeElement.blur(); } }); $(document).mouseup(function (e) { var container = $(".contact-overlay"); if (!container.is(e.target) // if the target of the click isn't the container... && container.has(e.target).length === 0) // ... nor a descendant of the container { $('.main-contact-overlay').css({"display": "none"}); if($('.list-main-container').length>=1){ $('.list-main-container').show(); } flg_report_overlay = 0; //$('#recap').val(0); $('.contact-overlay').show(); $('#msg_report_success').hide(); $('.emailform').val(''); $('.txtdes').val(''); $('#compress_report').val(''); $('#inputfile_report').show(); $('#upload_file_report').hide(); } }); }); function close_contact_box(){ $('.main-contact-overlay').css({"display": "none"}); if($('.list-main-container').length>=1){ $('.list-main-container').show(); } flg_report_overlay = 0; } $(window).resize(function () { if (flg_report_overlay == 1) { //$('.main-contact-overlay').css({"display": "block", 'height': $(main_class_display_height).height() + $('.on-small-footer-hidden').height()}); $('.main-contact-overlay').css({"display": "block", 'height': "1000%"}); if($('.list-main-container').length>=1){ $('.list-main-container').hide(); } } });