Diligent web site
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

custom.js 23KB

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