','','','
','','','','','
','',''].join('')),$notice = $cForm.find('#notice');$cForm.find('form').on('submit', function(){var $reqFields = $cForm.find('.reqField');return function(evt){var empty = -1, data = {};evt.preventDefault();$reqFields.each(function(indx, field){if(empty === -1){var $field = $(field);if(field.value === ''){$field.attr('style','border-color:red');empty = indx;$notice.html('Please enter a valid '+$field.attr('placeholder'));}else{$field.attr('style','border-color:white');data[$(field).attr('name')] = field.value;}}});if(empty === -1){if(isOptIn){const {fname, email, phone} = data;const payload = {fname, email, phone, campaign_id:isOptIn.campaign_id, parent:+webprez.userId};$.ajax('/drip/subscribe', {method:'POST',processData:false,data:JSON.stringify(payload)}).done(function(){$cForm.find('form')[0].reset();$notice.addClass('confirmed');$notice.html('Thank you!');setTimeout(function(){popUp.hide();$notice.html(' ');$notice.removeClass('confirmed');},3000);});}else{$.ajax('/feedback/'+webprez.userId, {method:'POST',processData:false,data:JSON.stringify(data)}).done(function(){$cForm.find('form')[0].reset();$notice.addClass('confirmed');$notice.html('Thank you '+data.fname.replace(/[^A-Za-z \']/,'')+', I will contact you shortly!');setTimeout(function(){popUp.hide();$notice.html(' ');$notice.removeClass('confirmed');},3000);});}}};}());return $cForm;};var $ctaButton = $([''].join(''));const {userId, videoKey, tsMyVid} = webprez;const image = videoKey ? `https://assets-jpcust.jwpsrv.com/thumbs/${videoKey}-720.jpg` : `https://dw6dccszcs6ig.cloudfront.net/video-${userId}-${tsMyVid}/thumbnail-00001.png`;document.querySelector('#videoPlayer > .btn').setAttribute('style', `background-image:url("${image}")`);document.querySelector('#videoPlayer > .btn').addEventListener('click', () => {const cbkNext = ({file, image}) => {var showForm = (function(){var $curModal = $cForm();return function(){popUp.show($curModal);};})(),hideForm = function(){popUp.hide();},$player = jwplayer('videoPlayer').setup({"file":file,"image":image,"height": '100%',"width": '100%',"autostart": true});popUp.onHide = function(){$player.play();};};if(videoKey){$.ajax(`/manifest/${Date.now()}/${webprez.videoKey}`, {dataType:'json'}).done(function(data){const file = data.url.replace(/^http/,'https');cbkNext({file, image});});}else{const file = `https://dw6dccszcs6ig.cloudfront.net/video-${userId}-${tsMyVid}/part-.m3u8`;cbkNext({file, image});}});}());