1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10(function($) { 11 12 $(function() { 13 try { 14 if (typeof _wpcf7 == 'undefined' || _wpcf7 === null) 15 _wpcf7 = {}; 16 17 _wpcf7 = $.extend({ cached: 0 }, _wpcf7); 18 19 $('div.wpcf7 > form').ajaxForm({ 20 beforeSubmit: function(formData, jqForm, options) { 21 jqForm.wpcf7ClearResponseOutput(); 22 jqForm.find('img.ajax-loader').css({ visibility: 'visible' }); 23 return true; 24 }, 25 beforeSerialize: function(jqForm, options) { 26 jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) { 27 $(n).val(''); 28 }); 29 return true; 30 }, 31 data: { '_wpcf7_is_ajax_call': 1 }, 32 dataType: 'json', 33 success: function(data) { 34 var ro = $(data.into).find('div.wpcf7-response-output'); 35 $(data.into).wpcf7ClearResponseOutput(); 36 37 $(data.into).find('.wpcf7-form-control').removeClass('wpcf7-not-valid'); 38 $(data.into).find('form.wpcf7-form').removeClass('invalid spam sent failed'); 39 40 if (data.captcha) 41 $(data.into).wpcf7RefillCaptcha(data.captcha); 42 43 if (data.quiz) 44 $(data.into).wpcf7RefillQuiz(data.quiz); 45 46 if (data.invalids) { 47 $.each(data.invalids, function(i, n) { 48 $(data.into).find(n.into).wpcf7NotValidTip(n.message); 49 $(data.into).find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid'); 50 }); 51 52 ro.addClass('wpcf7-validation-errors'); 53 $(data.into).find('form.wpcf7-form').addClass('invalid'); 54 55 $(data.into).trigger('invalid.wpcf7'); 56 57 } else if (1 == data.spam) { 58 ro.addClass('wpcf7-spam-blocked'); 59 $(data.into).find('form.wpcf7-form').addClass('spam'); 60 61 $(data.into).trigger('spam.wpcf7'); 62 63 } else if (1 == data.mailSent) { 64 ro.addClass('wpcf7-mail-sent-ok'); 65 $(data.into).find('form.wpcf7-form').addClass('sent'); 66 67 if (data.onSentOk) 68 $.each(data.onSentOk, function(i, n) { eval(n) }); 69 70 $(data.into).trigger('mailsent.wpcf7'); 71 72 } else { 73 ro.addClass('wpcf7-mail-sent-ng'); 74 $(data.into).find('form.wpcf7-form').addClass('failed'); 75 76 $(data.into).trigger('mailfailed.wpcf7'); 77 } 78 79 if (data.onSubmit) 80 $.each(data.onSubmit, function(i, n) { eval(n) }); 81 82 $(data.into).trigger('submit.wpcf7'); 83 84 if (1 == data.mailSent) 85 $(data.into).find('form').resetForm().clearForm(); 86 87 $(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) { 88 $(n).val($(n).attr('title')); 89 }); 90 91 $(data.into).wpcf7FillResponseOutput(data.message); 92 } 93 }); 94 95 $('div.wpcf7 > form').each(function(i, n) { 96 if (_wpcf7.cached) 97 $(n).wpcf7OnloadRefill(); 98 99 $(n).wpcf7ToggleSubmit(); 100 101 $(n).find('.wpcf7-submit').wpcf7AjaxLoader(); 102 103 $(n).find('.wpcf7-acceptance').click(function() { 104 $(n).wpcf7ToggleSubmit(); 105 }); 106 107 $(n).find('.wpcf7-exclusive-checkbox').each(function(i, n) { 108 $(n).find('input:checkbox').click(function() { 109 $(n).find('input:checkbox').not(this).removeAttr('checked'); 110 }); 111 }); 112 113 $(n).find('.wpcf7-use-title-as-watermark').each(function(i, n) { 114 var input = $(n); 115 input.val(input.attr('title')); 116 input.addClass('watermark'); 117 118 input.focus(function() { 119 if ($(this).hasClass('watermark')) 120 $(this).val('').removeClass('watermark'); 121 }); 122 123 input.blur(function() { 124 if ('' == $(this).val()) 125 $(this).val($(this).attr('title')).addClass('watermark'); 126 }); 127 }); 128 }); 129 130 } catch (e) { 131 } 132 }); 133 134 $.fn.wpcf7AjaxLoader = function() { 135 return this.each(function() { 136 var loader = $('<img class="ajax-loader" />') 137 .attr({ src: _wpcf7.loaderUrl, alt: _wpcf7.sending }) 138 .css('visibility', 'hidden'); 139 140 $(this).after(loader); 141 }); 142 }; 143 144 $.fn.wpcf7ToggleSubmit = function() { 145 return this.each(function() { 146 var form = $(this); 147 if (this.tagName.toLowerCase() != 'form') 148 form = $(this).find('form').first(); 149 150 if (form.hasClass('wpcf7-acceptance-as-validation')) 151 return; 152
153 var submit = form.find('input:submit'); 154 if (! submit.length) return; 155 156 var acceptances = form.find('input:checkbox.wpcf7-acceptance'); 157 if (! acceptances.length) return; 158 159 submit.removeAttr('disabled'); 160 acceptances.each(function(i, n) { 161 n = $(n); 162 if (n.hasClass('wpcf7-invert') && n.is(':checked') 163 || ! n.hasClass('wpcf7-invert') && ! n.is(':checked')) 164 submit.attr('disabled', 'disabled'); 165 }); 166 }); 167 }; 168 169 $.fn.wpcf7NotValidTip = function(message) { 170 return this.each(function() { 171 var into = $(this); 172 into.append('<span class="wpcf7-not-valid-tip">' + message + '</span>'); 173 $('span.wpcf7-not-valid-tip').mouseover(function() { 174 $(this).fadeOut('fast'); 175 }); 176 into.find(':input').mouseover(function() { 177 into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast'); 178 }); 179 into.find(':input').focus(function() { 180 into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast'); 181 }); 182 }); 183 }; 184 185 $.fn.wpcf7OnloadRefill = function() { 186 return this.each(function() { 187 var url = $(this).attr('action'); 188 if (0 < url.indexOf('#')) 189 url = url.substr(0, url.indexOf('#')); 190 191 var id = $(this).find('input[name="_wpcf7"]').val(); 192 var unitTag = $(this).find('input[name="_wpcf7_unit_tag"]').val(); 193 194 $.getJSON(url, 195 { _wpcf7_is_ajax_call: 1, _wpcf7: id }, 196 function(data) { 197 if (data && data.captcha) 198 $('#' + unitTag).wpcf7RefillCaptcha(data.captcha); 199 200 if (data && data.quiz) 201 $('#' + unitTag).wpcf7RefillQuiz(data.quiz); 202 } 203 ); 204 }); 205 }; 206 207 $.fn.wpcf7RefillCaptcha = function(captcha) { 208 return this.each(function() { 209 var form = $(this); 210 211 $.each(captcha, function(i, n) { 212 form.find(':input[name="' + i + '"]').clearFields(); 213 form.find('img.wpcf7-captcha-' + i).attr('src', n); 214 var match = /([0-9]+)\.(png|gif|jpeg)$/.exec(n); 215 form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]); 216 }); 217 }); 218 }; 219 220 $.fn.wpcf7RefillQuiz = function(quiz) { 221 return this.each(function() { 222 var form = $(this); 223 224 $.each(quiz, function(i, n) { 225 form.find(':input[name="' + i + '"]').clearFields(); 226 form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]); 227 form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]); 228 }); 229 }); 230 }; 231 232 $.fn.wpcf7ClearResponseOutput = function() { 233 return this.each(function() { 234 $(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); 235 $(this).find('span.wpcf7-not-valid-tip').remove(); 236 $(this).find('img.ajax-loader').css({ visibility: 'hidden' }); 237 }); 238 }; 239 240 $.fn.wpcf7FillResponseOutput = function(message) { 241 return this.each(function() { 242 $(this).find('div.wpcf7-response-output').append(message).slideDown('fast'); 243 }); 244 }; 245 246})(jQuery); 247}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.