Diligent web site
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

custom.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. "use strict";
  2. function isOnScreen(elem) {
  3. // if the element doesn't exist, abort
  4. if( elem.length == 0 ) {
  5. return;
  6. }
  7. var $window = jQuery(window)
  8. var viewport_top = $window.scrollTop()
  9. var viewport_height = $window.height()
  10. var viewport_bottom = viewport_top + viewport_height
  11. var $elem = jQuery(elem)
  12. var top = $elem.offset().top
  13. var height = $elem.height()
  14. var bottom = top + height
  15. return (top >= viewport_top && top < viewport_bottom) ||
  16. (bottom > viewport_top && bottom <= viewport_bottom) ||
  17. (height > viewport_height && top <= viewport_top && bottom >= viewport_bottom)
  18. }
  19. // start custom scripts
  20. (function($) {
  21. jQuery(document).ready(function($){
  22. /*========== Swicher ==========*/
  23. /*========== Progress bar ==========*/
  24. function animate() {
  25. $(".progress-bar").each(function(){
  26. var progressValue = $(this).attr('data-value');
  27. $(this).animate({width: progressValue +'%'}, 6000);
  28. });
  29. }
  30. function scrollToID(url, id, speed) {
  31. if(url!==null)
  32. {
  33. window.location.href = url;
  34. }
  35. var offSet = 50;
  36. var obj = jQuery(id).offset();
  37. var targetOffset = 0;
  38. if(jQuery(id).length)
  39. {
  40. targetOffset = jQuery(id).offset().top - offSet;
  41. }
  42. jQuery('html,body').animate({ scrollTop: targetOffset }, speed)
  43. }
  44. function backToPreviousLink()
  45. {
  46. var loc = window.location;
  47. var responseFrom = loc.hash.lastIndexOf('=') + 1;
  48. if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'index.php' )
  49. {
  50. if(loc.hash.substring( responseFrom, loc.hash.length ) == 'about')
  51. {
  52. $('.about-section').addClass('active').append('<span class="nav-active-mark"></span>');
  53. }
  54. else if(loc.hash.substring( responseFrom, loc.hash.length ) == 'our_partners')
  55. {
  56. $('.our_partners-section').addClass('active').append('<span class="nav-active-mark"></span>');
  57. }
  58. else if(loc.hash.substring( responseFrom, loc.hash.length ) == 'contact')
  59. {
  60. $('.contact-section').addClass('active').append('<span class="nav-active-mark"></span>');
  61. }
  62. else
  63. {
  64. $('.intro-section').addClass('active').append('<span class="nav-active-mark"></span>');
  65. }
  66. }
  67. else if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'careers.php' )
  68. {
  69. $('.career-link').addClass('active').append('<span class="nav-active-mark"></span>');
  70. }
  71. else if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'apply.php' )
  72. {
  73. $('.career-link').addClass('active').append('<span class="nav-active-mark"></span>');
  74. }
  75. else if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'portfolio.php' )
  76. {
  77. $('.portfolio-link').addClass('active').append('<span class="nav-active-mark"></span>');
  78. }
  79. else if(loc.pathname.includes("services") )
  80. {
  81. $('.service-link').addClass('active').append('<span class="nav-active-mark"></span>');
  82. }
  83. else if(loc.pathname.includes("industries") )
  84. {
  85. $('.industries-link').addClass('active').append('<span class="nav-active-mark"></span>');
  86. }
  87. }
  88. //homepage
  89. var previousLink;
  90. var indexPeviousSelectedLink = 0;
  91. $('#navigation .service-link').on('click', function()
  92. {
  93. $(".nav-active-mark").parent().removeClass("active")
  94. $(".nav-active-mark").remove();
  95. $('#industriesMenu').css('display', 'none');
  96. $('#servicesMenu').toggle('active');
  97. if($('#header').hasClass('active_dropdown'))
  98. {
  99. if(previousLink != 'industries')
  100. {
  101. $('#header').removeClass('active_dropdown');
  102. }
  103. $(this).remove('.nav-active-mark').removeClass('active');
  104. backToPreviousLink();
  105. previousLink = '';
  106. }
  107. else
  108. {
  109. $('#header').addClass('active_dropdown');
  110. $(this).addClass('active').append('<span class="nav-active-mark"></span>');
  111. previousLink = 'services';
  112. }
  113. });
  114. $('#navigation .industries-link').on('click', function()
  115. {
  116. $(".nav-active-mark").parent().removeClass("active")
  117. $(".nav-active-mark").remove();
  118. $('#servicesMenu').css('display', 'none');
  119. $('#industriesMenu').toggle('active');
  120. if($('#header').hasClass('active_dropdown'))
  121. {
  122. if(previousLink != 'services')
  123. {
  124. $('#header').removeClass('active_dropdown');
  125. }
  126. $(this).remove('.nav-active-mark').removeClass('active');
  127. backToPreviousLink();
  128. previousLink = '';
  129. }
  130. else
  131. {
  132. $('#header').addClass('active_dropdown');
  133. $(this).addClass('active').append('<span class="nav-active-mark"></span>');
  134. previousLink = 'industries';
  135. }
  136. });
  137. $('#mobile-navigation .service-link').click(function(event){
  138. event.stopPropagation();
  139. var mobileDrodown = $(this).find('ul');
  140. if(mobileDrodown.is( ":hidden" ))
  141. {
  142. mobileDrodown.slideDown('slow');
  143. mobileDrodown.removeClass('active');
  144. }
  145. else
  146. {
  147. mobileDrodown.hide();
  148. mobileDrodown.addClass('active');
  149. }
  150. });
  151. $('#mobile-navigation .industries-link').click(function(event){
  152. event.stopPropagation();
  153. var mobileDrodown = $(this).find('ul');
  154. if(mobileDrodown.is( ":hidden" ))
  155. {
  156. mobileDrodown.slideDown('slow');
  157. mobileDrodown.removeClass('active');
  158. }
  159. else
  160. {
  161. mobileDrodown.hide();
  162. mobileDrodown.addClass('active');
  163. }
  164. });
  165. //homepage end
  166. //career
  167. var expand = false;
  168. $('.position').on('click', function(ev) {
  169. //ev.preventDefault();
  170. $(this).find(".chev").toggleClass('chevron--down chevron--up');
  171. $(this).closest(".position-cont").find(".collapse").toggleClass("show");
  172. $(this).toggleClass("active"); //css({"background-color": "#993c95", "color": "white"});
  173. expand= !expand;
  174. });
  175. $('.chev').on('click', function(ev) {
  176. //ev.preventDefault();
  177. $(this).toggleClass('chevron--down chevron--up');
  178. $(this).closest(".position-cont").find(".collapse").toggleClass("show");
  179. $(this).closest(".position").toggleClass("active"); //css({"background-color": "#993c95", "color": "white"});
  180. expand= !expand;
  181. });
  182. //end career
  183. //apply
  184. // $(".resume-cont").click(function()
  185. // {
  186. // $(".resume-file").click();
  187. // });
  188. if( $("#positions").length)
  189. {
  190. $("#positions").selectize({
  191. create: true,
  192. sortField: {
  193. field: 'text',
  194. direction: 'asc'
  195. },
  196. });
  197. }
  198. var resume = "";
  199. $("input:file").change(function (event){
  200. var fileName = $(this).val();
  201. var reader = new FileReader();
  202. reader.onload = function(e)
  203. {
  204. resume = e.target.result;
  205. }
  206. reader.readAsDataURL(this.files[0]);
  207. var fileExtensionAt = fileName.lastIndexOf(".") + 1;
  208. var fileExtension = fileName.substring(fileExtensionAt, fileName.length);
  209. if(fileName!="" && fileExtension == "doc" || fileExtension == "docx" || fileExtension == "pdf")
  210. {
  211. var from = fileName.lastIndexOf("\\") + 1;
  212. var to = fileName.length ;
  213. fileName = fileName.substring(from, to);
  214. }
  215. else{
  216. fileName="Choose file";
  217. }
  218. $(".resume-file-cont label").html(fileName);
  219. });
  220. $(".btn-delete-file").click(function(e)
  221. {
  222. e.preventDefault();
  223. $(".resume-file-cont label").html("Choose file");
  224. });
  225. var btn_apply = $("#apply-submit");
  226. var apply_form = $("#apply-form");
  227. apply_form.bind('submit', function(ev) {
  228. ev.preventDefault();
  229. var resume_file = document.getElementById("resume-file").files[0];
  230. var data = new FormData(document.getElementById("apply-form"));
  231. data.append("resume", "'" + resume + "'");
  232. data.append("resume-file", resume_file);
  233. $.ajax({
  234. url: "job_apply.php?call=upload",
  235. method: "POST",
  236. data: data,
  237. contentType: false,
  238. cache: false,
  239. processData:false,
  240. success : function(data) {
  241. window.location.replace("careers.php?response=successful");
  242. },
  243. error: function(error)
  244. {
  245. console.log(console.error);
  246. }
  247. });
  248. });
  249. //apply end
  250. //contact form
  251. var contact_form = $("#contact-form");
  252. var contact_button = jQuery("#contact-form #submit");
  253. var status = jQuery(".log");
  254. contact_form.bind('submit', function(event)
  255. {
  256. event.preventDefault();
  257. var data = new FormData(document.getElementById("contact-form"));
  258. $.ajax({
  259. url: "contact_form.php",
  260. method: "POST",
  261. data: data,
  262. contentType: false,
  263. cache: false,
  264. processData:false,
  265. success : function(data) {
  266. window.location.replace("index.php");
  267. },
  268. error: function(error)
  269. {
  270. console.log(console.error);
  271. }
  272. });
  273. });
  274. $('.clear_storage').on('click', function(e){
  275. window.localStorage.clear();
  276. });
  277. var get_id = localStorage.getItem('pg_id');
  278. var setupUrl = false;
  279. // check page id, then scroll to its div
  280. if(get_id)
  281. {
  282. scrollToID(null, get_id, 300);
  283. }
  284. jQuery(document).ready(function()
  285. {
  286. var loc = window.location;
  287. if(!get_id && loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'index.php' && !setupUrl)
  288. {
  289. var sectionType = window.location.hash;
  290. var id = sectionType.substr(sectionType.indexOf('=') + 1, sectionType.length );
  291. id+="-section";
  292. if(id != "" && id != null)
  293. {
  294. var nav_link = "#navigation ."+ id +" > a";
  295. var item = $(nav_link);
  296. item.trigger('click');
  297. setupUrl =true;;
  298. }
  299. }
  300. });
  301. $("#back-to-top").on('click', function()
  302. {
  303. $(window).scrollTop(0);
  304. $(this).removeClass('active');
  305. });
  306. // click event to scroll to div
  307. //section link in nav which refer to section on homepage
  308. $('.home_link').on('click', function(e){
  309. e.preventDefault();
  310. var id = '#'+$(this).data('id');
  311. localStorage.setItem('pg_id', id);
  312. var url = $(this).attr("href");
  313. scrollToID(url, id, 300);
  314. });
  315. //Link from our partners section on homepage which refer to section on portfolio page
  316. $('.partners_link').on('click', function(e){
  317. e.preventDefault();
  318. var id = '#'+$(this).data('id');
  319. localStorage.setItem('pg_id', id);
  320. var url = $(this).attr("href");
  321. scrollToID(url, id, 300);
  322. });
  323. var siteUrl = window.location.hash;
  324. window.addEventListener('scroll', function(e) {
  325. if($( document ).width() <= 768)
  326. {
  327. $("#back-to-top").addClass("active");
  328. }
  329. if($( document ).scrollTop() == 0)
  330. {
  331. $("#back-to-top").removeClass("active");
  332. }
  333. var loc = window.location;
  334. if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'index.php')
  335. {
  336. var newUrl = "";
  337. if( isOnScreen( $( '#intro-section' ) ) ) { /* Pass element id/class you want to check */
  338. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  339. $("nav li.intro-section").addClass("active").append('<span class="nav-active-mark"></span>');
  340. //newUrl = siteUrl.substring(0, siteUrl.indexOf("/"));
  341. parent.location.hash = "?section=intro";
  342. }
  343. if( isOnScreen( $( '#about-section' ) ) ) { /* Pass element id/class you want to check */
  344. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  345. $("nav li.about-section").addClass("active").append('<span class="nav-active-mark"></span>');
  346. parent.location.hash = "?section=about";
  347. }
  348. if( isOnScreen( $( '#our_partners-section' ) ) ) { /* Pass element id/class you want to check */
  349. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  350. $("nav li.our_partners-section").addClass("active").append('<span class="nav-active-mark"></span>');
  351. parent.location.hash = "?section=our_partners";
  352. }
  353. if( isOnScreen( $( '#services-section' ) ) ) { /* Pass element id/class you want to check */
  354. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  355. $("nav li.services-section").addClass("active").append('<span class="nav-active-mark"></span>');
  356. parent.location.hash = "?section=services";
  357. }
  358. if( isOnScreen( $( '#teams-wrap' ) ) ) { /* Pass element id/class you want to check */
  359. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  360. $("nav li.teams-wrap").addClass("active").append('<span class="nav-active-mark"></span>');
  361. newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "teams-wrap";
  362. parent.location.hash = "?section=teams"
  363. }
  364. if( isOnScreen( $( '#contact-section' ) ) ) { /* Pass element id/class you want to check */
  365. $("nav li.active").removeClass("active").find('.nav-active-mark').remove();
  366. $("nav li.contact-section").addClass("active").append('<span class="nav-active-mark"></span>');
  367. parent.location.hash = "?section=contact"
  368. }
  369. }
  370. });
  371. //careers
  372. var loc = window.location;
  373. //response=successful
  374. var responseFrom = loc.search.lastIndexOf('=') + 1;
  375. if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'careers.php' && loc.search.substring( responseFrom, loc.search.length ))
  376. {
  377. $('.background-overlay').addClass('active');
  378. $('.apply-notification').addClass('active');
  379. }
  380. $('.close-notification').click(function()
  381. {
  382. window.location.replace("careers.php");
  383. }
  384. )
  385. //careers end
  386. /*========== Disables ==========*/
  387. if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
  388. $('#animate_css_file, #wow_js_file').remove();
  389. } else {
  390. /*========== WOW Animations ==========*/
  391. var wow = new WOW(
  392. {
  393. animateClass: 'animated',
  394. offset: 100
  395. }
  396. );
  397. wow.init();
  398. }
  399. /*========== Logo Retina ==========*/
  400. if( window.devicePixelRatio > 1 ) {
  401. var logoWidth = $('#logo img').width();
  402. var logoHeight = $('#logo img').height();
  403. $('#logo img').attr("src", "images/logo@2x.png");
  404. $('#logo img').css({ 'width': logoWidth , 'height': logoHeight });
  405. }
  406. /*========== Team Item Hover ==========*/
  407. $('.team-item').each(function(){
  408. var memberImage = $(this).find('.member-face').attr('style');
  409. var current = $(this).find('.change-color');
  410. $(this).find('.hex-in2.outer-hex').first().hover(function(){
  411. $(this).find('.member-face').css('background','#000');
  412. $(current).css('background-color','#f3b202');
  413. $(this).find('.socials').show();
  414. },function(){
  415. $(this).find('.socials').hide();
  416. $(this).find('.member-face').attr('style', memberImage);
  417. $(current).css('background-color','#000');
  418. });
  419. });
  420. /*========== Gallery Item Hover ==========*/
  421. $('.gallery-item').hover(function(){
  422. $(this).find('.gallery-info').stop(true,true).animate({ "top": "0" } );
  423. },function(){
  424. $(this).find('.gallery-info').stop(true,true).animate({ "top": "-999" } );
  425. });
  426. /*========== Pie Chart ==========*/
  427. $('.days').waypoint(function() {
  428. $('.chart').easyPieChart({
  429. easing: 'easeOutBounce',
  430. barColor: '#f3b202',
  431. trackColor: '#595959',
  432. lineWidth: '18',
  433. lineCap: 'butt',
  434. size: '160',
  435. scaleColor: false,
  436. onStep: function(from, to, percent) {
  437. $(this.el).find('.percent').text(Math.round(percent));
  438. }
  439. });
  440. });
  441. /*========== Smooth Scroll ==========*/
  442. $('a[href*=#]:not([href=#])').click(function() {
  443. $("li.active").removeClass("active").find('.nav-active-mark').remove();
  444. $("#navigation ul > li").each( function(index)
  445. {
  446. var selected = $(this).find(".nav-active-mark");
  447. if(selected.length)
  448. {
  449. indexPeviousSelectedLink = index +1;
  450. console.log(indexPeviousSelectedLink);
  451. }
  452. });
  453. $(this).parent().addClass('active').end().append('<span class="nav-active-mark"></span>');
  454. if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
  455. var target = $(this.hash);
  456. target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
  457. if (target.length) {
  458. $('html,body').animate({
  459. scrollTop: target.offset().top - 53
  460. }, 1000);
  461. return false;
  462. }
  463. }
  464. });
  465. /*========== Graph Bars Animate ==========*/
  466. $('.days').waypoint(function() {
  467. $('.graph ul li.bar').each(function() {
  468. var curBarHeight = $(this).data('bar-height');
  469. $(this).animate({ height: curBarHeight }, 2000, "easeInOutBack");
  470. });
  471. });
  472. /*========== Intro Note Box Tooltip ==========*/
  473. /*$('.note-1').hover(function(){
  474. $(this).find('.note-tooltip').fadeIn();
  475. },function(){
  476. $(this).find('.note-tooltip').fadeOut();
  477. });
  478. */
  479. /*========== PrettyPhoto ==========*/
  480. $("a[data-rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded', hook: 'data-rel'});
  481. /*========== Flickr ==========*/
  482. var flickrImageSrc = [ ];
  483. var flickrLink = [ ];
  484. $('.flickr_badge_image').each(function(i){
  485. flickrImageSrc[i] = $(this).find('img').attr('src');
  486. flickrLink[i] = $(this).find('a').attr('href');
  487. });
  488. $('.flickr-item').each(function(i){
  489. $(this).find('.hex-area').css('background-image', 'url(' + flickrImageSrc[i] + ')');
  490. $(this).find('.flickr-link').attr('href', flickrLink[i] );
  491. });
  492. /*========== Window Resize ==========*/
  493. var windowWidth = $(window).width();
  494. var numberOfHexagon = windowWidth / 106;
  495. var offsetBackground = ((numberOfHexagon - 14) * 106 ) /2;
  496. $('#hexagon-overlay').css('background-position', offsetBackground + 'px' + ' ' + 'top');
  497. $(window).resize(function() {
  498. var currentWindowWidth = $(window).width();
  499. if(currentWindowWidth <= 940) return;
  500. $('#hexagon-overlay').css('background-position', - ( ( (windowWidth - currentWindowWidth)/2 ) - offsetBackground ) + 'px' + ' ' + 'top');
  501. });
  502. /*========== Mobile Menu ==========*/
  503. $('.mobile-nav-toggle').on('click',function(){
  504. if($(this).attr('class') == 'mobile-nav-toggle deactive') {
  505. $('#mobile-navigation').fadeIn();
  506. $(this).removeClass('deactive');
  507. } else {
  508. $('#mobile-navigation').fadeOut();
  509. $(this).addClass('deactive');
  510. }
  511. });
  512. $("#mobile-navigation li:not(.service-link):not(.industries-link) a").on("click", function(){
  513. $('#mobile-navigation').fadeOut();
  514. $(".mobile-nav-toggle").addClass('deactive');
  515. });
  516. $(window).resize(function(){
  517. var w = $(window).width();
  518. if(w > 767) {
  519. $('#mobile-navigation').fadeOut();
  520. $(".mobile-nav-toggle").addClass('deactive');
  521. }
  522. });
  523. /*========== Contact Form Validation ==========*/
  524. function isValidEmailAddress(emailAddress) {
  525. var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
  526. return pattern.test(emailAddress);
  527. }
  528. /*========== FlexSlider ==========*/
  529. $('.flexslider').flexslider({
  530. animation: "fade",
  531. animationLoop: false,
  532. directionNav: false,
  533. slideshow: false
  534. });
  535. }); // end jquery init
  536. })(jQuery);
  537. var verifyCallbackApply = function(response) {
  538. return new Promise(function(resolve, reject) {
  539. if (response) {
  540. //jQuery("#apply-form").submit();
  541. $('#apply-submit').removeAttr('disabled');
  542. }
  543. });
  544. };
  545. var verifyCallbackContact = function(response) {
  546. return new Promise(function(resolve, reject) {
  547. if (response) {
  548. //jQuery("#apply-form").submit();
  549. $('#contact-form #submit').removeAttr('disabled');
  550. }
  551. });
  552. };
  553. var onloadCallback = function () {
  554. if (jQuery('#googlecapatcha_apply').length) {
  555. recaptcha = grecaptcha.render('googlecapatcha_apply', {
  556. 'sitekey': "6Lc3Bt8ZAAAAACPv1F98oFvwPOYVyvWvmN1HYkrS",
  557. 'theme': 'light',
  558. 'callback': verifyCallbackApply
  559. });
  560. }
  561. if (jQuery('#googlecapatcha_contact').length)
  562. {
  563. recaptcha = grecaptcha.render('googlecapatcha_contact', {
  564. 'sitekey': "6Lc3Bt8ZAAAAACPv1F98oFvwPOYVyvWvmN1HYkrS",
  565. 'theme': 'light',
  566. 'callback': verifyCallbackContact
  567. });
  568. }
  569. };