/*Play Video*/ var video = document.getElementById("video_intro"); var playButton = document.getElementById("poptin_play_button"); if (video) { /*playButton.addEventListener("click", function() { if (video.paused == true) { video.play(); playButton.classList.add("video-on"); playButton.innerHTML = "Pause"; } else { video.pause(); playButton.classList.remove("video-on"); playButton.innerHTML = "Play"; } });*/ } jQuery(function() { jQuery(".menu-item-has-children").click(function(){ if( jQuery(this).hasClass('close_menu')){ jQuery(this).removeClass('close_menu') } else { jQuery(this).addClass('close_menu'); } }) jQuery(".menu-item-has-children").hover(function(){ jQuery(this).removeClass('close_menu'); }); }); (function($) { var header = jQuery('#sticky-header'); var win = jQuery(window); win.on('scroll', function() { var scroll = win.scrollTop(); /*var scroll = win.scrollTop(); if (scroll < 1) { header.removeClass("sticky-header"); } else { header.addClass("sticky-header"); }*/ jQuery("section").each(function() { // var elementTop = jQuery(this).offset().top - jQuery('#rs-header').outerHeight(); var elementTop = jQuery(this).offset().top; if (scroll >= elementTop) { jQuery(this).addClass('loaded'); jQuery('body').addClass('fixed-navpoptin'); } else { jQuery('body').removeClass('fixed-navpoptin'); } }); }); }(jQuery)); jQuery(function($) { jQuery('.et_pb_toggle_title').click(function() { var $toggle = jQuery(this).closest('.et_pb_toggle'); if (!$toggle.hasClass('et_pb_accordion_toggling')) { var $accordion = $toggle.closest('.et_pb_accordion'); if ($toggle.hasClass('et_pb_toggle_open')) { $accordion.addClass('et_pb_accordion_toggling'); $toggle.find('.et_pb_toggle_content').slideToggle(700, function() { $toggle.removeClass('et_pb_toggle_open').addClass('et_pb_toggle_close'); }); } setTimeout(function() { $accordion.removeClass('et_pb_accordion_toggling'); }, 750); } }); jQuery('a.package-btn').click(function() { var dactive = jQuery(this).attr("data-active"); var bactive = jQuery("#toogle-package").attr("data-active"); if (dactive != bactive) { jQuery("#toogle-package").attr("data-active", dactive); jQuery("#toogle-package").trigger('click'); } }); jQuery("#toogle-package").click(function() { var x = ""; if (jQuery("#toogle-package").hasClass("active")) { var v = "monthly"; x = "yearly"; } else { var v = "yearly"; x = "monthly"; } jQuery("#toogle-package").attr("data-active", v); toggle_package(v); }); if (jQuery(".poptin-features-table").length > 0) { jQuery(".poptin-features-table tbody").each(function() { var tbodyCls = jQuery(this).attr("class"); var i = 0; jQuery(this).find("tr:visible").each(function() { var clsNm = (i % 2) == 0 ? "odd" : "even"; jQuery(this).addClass(clsNm); i++; }); }); } jQuery(".expand_feature_table").click(function() { if (jQuery('body').hasClass('expanded_features')) { jQuery("body").removeClass("expanded_features"); jQuery(".expand_feature_table").text("Expand feature table >>"); jQuery(".poptin-features-table tbody").each(function() { var tbodyCls = jQuery(this).attr("class"); var i = 0; jQuery(this).find("tr:visible").each(function() { var clsNm = (i % 2) == 0 ? "odd" : "even"; jQuery(this).addClass(clsNm); i++; }); }); } else { jQuery("body").addClass("expanded_features"); jQuery(".expand_feature_table").text("Minimize feature table >>"); jQuery(".poptin-features-table tbody").each(function() { var tbodyCls = jQuery(this).attr("class"); jQuery(this).find("tr:visible").length; jQuery(this).find("tr:visible").removeClass("odd"); jQuery(this).find("tr:visible").removeClass("even"); }); } return false; }); function toggle_package(v) { //console.log(v); jQuery(".package-btn").removeClass("active"); jQuery(".package-btn.pt" + v).addClass("active"); jQuery(".psubact").addClass("hidepkgsub"); jQuery("." + v + "-package-sub").removeClass("hidepkgsub");; if(jQuery(".btn-selplan").length>0){ jQuery(".btn-selplan").each(function() { var btn_url = jQuery(this).attr("href"); if(v=='monthly'){ var new_btn_url = btn_url.replace("annually","monthly"); }else{ var new_btn_url = btn_url.replace("monthly","annually"); } jQuery(this).attr("href",new_btn_url); }); } } /*Agencies Slider*/ if (jQuery(".poptin-agn-slider").length > 0) { jQuery(".poptin-agn-slider").slick( { dots: false, infinite: true, centerMode: true, slidesToShow: 3, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 1 } }, { breakpoint: 480, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 1 } }, { breakpoint: 1920, settings: { centerMode: true, centerPadding: '40px', slidesToShow: 3 } }] }); } }); //fadein images $next = 1; // fixed, please do not modfy; $current = 0; // fixed, please do not modfy; $interval = 4000; // You can set single picture show time; $fadeTime = 1200; // You can set fadeing-transition time; $imgNum = 2; // How many pictures do you have jQuery(document).ready(function() { //NOTE : Div Wrapper should with css: relative; //NOTE : img should with css: absolute; //NOTE : img Width & Height can change by you; /*jQuery('.fadeImg').css('position','relative'); jQuery('.fadeImg img').css({'position':'absolute','height':'61px'});*/ nextFadeIn(); }); function nextFadeIn() { //make image fade in and fade out at one time, without splash vsual; jQuery('.featured-clients-row').eq($current).delay($interval).fadeOut($fadeTime) .end().eq($next).delay($interval).hide().fadeIn($fadeTime, nextFadeIn); // if You have 5 images, then (eq) range is 0~4 // so we should reset to 0 when value > 4; if ($next < $imgNum - 1) { $next++; } else { $next = 0; } if ($current < $imgNum - 1) { $current++; } else { $current = 0; } }; function start_scroll() { jQuery('#form-frame').animate({scrollTop: jQuery('#form-frame')[0].scrollHeight},1000,function(){ //alert("end reached"); jQuery(".animate-image-section-2.animate-image-holder").css("visibility","visible"); jQuery(".animate-image-section-2.animate-image-holder").slideDown(1000, function(){ jQuery('#form-frame').animate({scrollTop: jQuery('#form-frame')[0].scrollHeight}, 500); }); }); }; function end_scroll() { jQuery('#form-frame').scrollTop(0); jQuery(".animate-image-section-2.animate-image-holder").hide(); jQuery(".animate-image-section-2.animate-image-holder").css("visibility","hidden"); }; //Auto responder envelope function anim_autorespo_envelope() { setInterval( function() { if(jQuery(".env-body-inside-3").is(":visible")) { jQuery(".env-body-inside-3").hide(); } else { jQuery(".env-body-inside-3").show(); } },2000); setInterval( function() { if(jQuery("#myanim").length>0) { document.getElementById("myanim").beginElement(); } },4000); } function anim_autorespo_machines() { setInterval( function() { if(jQuery(".main-frames-bg").css("animation-name")=="animatedBackground") { jQuery(".main-frames-bg").css("animation-name",""); } else { jQuery(".main-frames-bg").css("animation-name","animatedBackground"); } },1000); } var messages = ["zoomIn", "slideInRight", "slideInLeft", "slideInDown", "slideInUp"]; function getAnimationEffect() { return messages[Math.floor(Math.random() * messages.length)]; } var messages_ss = [ "slideInRight", "slideInLeft", "slideInDown", "slideInUp"]; function getAnimationEffect_ss() { return messages_ss[Math.floor(Math.random() * messages.length)]; } function getPlanUrlVars(url) { var vars = [], hash; var hashes = url.slice(url.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } // When the user scrolls down 20px from the top of the document, show the button jQuery(document).ready(function() { /*==SELECT Dropdown SELECT2==*/ if (jQuery(".popTinSelect").length > 0) { // minimumResultsForSearch: -1 jQuery(".popTinSelect").each(function() { var selItem = jQuery(this); var selTypeCls = ""; if (typeof jQuery(this).attr("data-selectType") !== 'undefined') { selTypeCls = jQuery(this).attr("data-selectType"); jQuery(this).find('.select2-selection').addClass(selTypeCls); console.log(selTypeCls); } var isSearch = jQuery(this).attr("data-search"); if (isSearch == 'true') { console.log("search-enabled"); jQuery(this).select2({ containerCssClass: selTypeCls, alowClear: true, templateResult: function(data, container) { if (data.element) { jQuery(container).attr("data-indicator", jQuery(data.element).attr("class")); } return data.text; }, templateSelection: function(data, container) { if (data.element) { jQuery(container).attr("data-indicator", jQuery(data.element).attr("class")); } return data.text; } }); } else { jQuery(this).select2({ alowClear: true, minimumResultsForSearch: -1, containerCssClass: selTypeCls, templateResult: function(data, container) { if (data.element) { jQuery(container).attr("data-indicator", jQuery(data.element).attr("class")); } return data.text; }, templateSelection: function(data, container) { if (data.element) { jQuery(container).attr("data-indicator", jQuery(data.element).attr("class")); } return data.text; } }); } }); } /*Agency Select Change event*/ jQuery('#agencySelectViews').on('change',function(e){ e.preventDefault(); jQuery('.agency_pkg_pricing').attr("id","agency_price"+this.value); //jQuery('.btn4').attr('data-type',this.value); jQuery(e.target).parents('.pricing-item').find('.sub.views').html(this.text); jQuery('.agencyDiv').find('.price-m').html(stripe_packages[this.value].amount/100); jQuery('.agencyDiv').find('.price-y').html(Math.floor(stripe_packages[this.value].amount/100*0.8)); jQuery('.agencyDiv').find('.line').html('$'+stripe_packages[this.value].amount/100); jQuery('#agencyViewP').text(jQuery(this).find(":selected").text().split(' ')[0]+' '+lang.views_in_month); jQuery('.package-desc').attr("data-vid",this.value); var is_bf_offer = ($("#black-friday-pricing-block").length > 0) ? 1 :0; var offer_price=0; n = stripe_packages[this.value].views/10 jQuery('#agencyAutoresponderLimit').html(n.toLocaleString()+" "); var price_monthly=(stripe_packages[this.value].amount/100); var price_yearly=Math.floor(stripe_packages[this.value].amount/100*0.8); var sv=(price_monthly*12)-(price_yearly*12); jQuery(".agencyDiv .price-ysave").html('$'+sv); console.log("Monthly Price:"+price_monthly); console.log("Annual Price:"+price_yearly); if(is_bf_offer){ offer_price= price_yearly * 0.65; offer_price = offer_price.toFixed(2); jQuery('.agencyDiv').find('.monthly-package-sub .price-m').html(offer_price); } if (this.value != jQuery('#hiddenPackegeTypeInput').val() || jQuery('#hiddenPackageIntervalInput').val() !== interval){ jQuery('.agencyDiv').removeClass('current-package'); }else{ jQuery('.agencyDiv').addClass('current-package'); } if(this.value==4){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_4); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_4); } else if(this.value==6){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_9); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_9); console.log(lang.package4_tooltip_1_9); }else if(this.value==7){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_10); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_10); }else if(this.value==8){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_11); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_11); }else if(this.value==9){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_12); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_12); } else if(this.value==10){ jQuery('#agencySelectViews').parent("div").parent("li").attr("data-title",lang.package4_tooltip_1_13); jQuery('#agencyAutoresponderLimit').parent("li").attr("data-title",lang.package4_tooltip_4_13); } var url_new = jQuery(".agencyDiv .btn-selplan").attr("href"); var url_vars = getPlanUrlVars(url_new); var old_agency_id = getPlanUrlVars(url_new)["agency_plan_id"]; var selected_agency_id = jQuery('#agencySelectViews option:selected').attr('data-planid'); var new_btn_url = url_new.replace(old_agency_id,selected_agency_id); jQuery(".agencyDiv .btn-selplan").attr("href",new_btn_url); }); /*==Forms==*/ jQuery('#abtest-block').waypoint(function(direction) { jQuery("#abtest-block .intext").show(); }); jQuery('.forms-page-section.section-3').waypoint(function(direction) { if(direction=='down') { jQuery("#abtest-block .intext").hide(); } else { jQuery("#abtest-block .intext").show(); } }); jQuery("[src='https://analytics.upress.io/pixel.png']").remove(); /*Homepage tabs*/ jQuery('#form-tabs-block h4').waypoint(function() { if(jQuery('#form-frame').scrollTop() + jQuery('#form-frame').innerHeight() <= jQuery('#form-frame')[0].scrollHeight) { start_scroll(); } }); jQuery('.forms-vertical-tabs li a').click(function() { var parent_class=jQuery(this).parent().attr("class"); if(jQuery("."+parent_class+".et_pb_tab").find(".scrollable-block").length>0) { setTimeout(function(){start_scroll();},1000); } else { end_scroll(); } }); new WOW().init(); /*setTimeout( function() { if (jQuery(".typed").length > 0) { jQuery("em.blinking").remove(); var typed4 = new Typed('.typed b', { strings: ["Customers", "Subscribers", "Leads", "Sales", "Calls"], typeSpeed: 100, backSpeed: 100, backDelay: 1000, toggleBlinking: true, loop: true }); } }, 5000);*/ anim_autorespo_envelope(); if(jQuery(".main-frames-bg").length>0) { anim_autorespo_machines(); } setTimeout( function() { jQuery("#sbg-envelope").css("opacity","1"); },500); jQuery('.page-automotive .popups-page-section.section-2').waypoint(function(direction) { }); jQuery('.page-automotive .popups-page-section.section-2').waypoint({ handler: function(direction) { //console.log("waypoint reached"); var animation_type_ss=getAnimationEffect_ss(); var animation_type=getAnimationEffect(); if(!jQuery(".page-automotive .popups-page-section.section-2 img").hasClass("animated")){ if(jQuery('.page-automotive .popups-page-section.section-2 .et_pb_image').hasClass("bside-popup-right")){ jQuery(".page-automotive .popups-page-section.section-2 img").addClass(animation_type_ss); } else if(jQuery('.page-automotive .popups-page-section.section-2 .et_pb_image').hasClass("ssidebar-popup-small-inside")){ jQuery(".page-automotive .popups-page-section.section-2 img").addClass(animation_type); } else{ jQuery(".page-automotive .popups-page-section.section-2 img").addClass(animation_type); } } jQuery(".page-automotive .popups-page-section.section-2 img").addClass('animated'); if(jQuery(".page-automotive .popups-page-section.section-2 img").is(":hidden")){ jQuery(".page-automotive .popups-page-section.section-2 img").show(); } }, offset: 150 }); jQuery('.page-automotive .popups-page-section.section-3.et_pb_section_2').waypoint(function(direction) { var animation_type_ss=getAnimationEffect_ss(); var animation_type=getAnimationEffect(); if(!jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").hasClass("animated")){ jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").addClass('animated'); if(jQuery('.page-automotive .popups-page-section.section-3.et_pb_section_2 .et_pb_image').hasClass("bside-popup-right")){ jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").addClass(animation_type_ss); }else if(jQuery('.page-automotive .popups-page-section.section-3.et_pb_section_2 .et_pb_image').hasClass("ssidebar-popup-small-inside")){ jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").addClass(animation_type); }else{ jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").addClass(animation_type); } } jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").addClass('animated'); if(jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").is(":hidden")){ jQuery(".page-automotive .popups-page-section.section-3.et_pb_section_2 img").show(); } }); }); jQuery(function() { jQuery( '#ri-grid' ).gridrotator( { rows : 1, columns : 6, animType : 'fadeInOut', animSpeed : 500, interval : 1000, step : 1, w320 : { rows : 1, columns : 2 }, w240 : { rows : 1, columns : 2 } }) }); jQuery( function() { jQuery( '.type-text' ).each( function() { var items = jQuery( this ).attr( 'title' ); jQuery( this ).empty().attr( 'title', '' ).teletype( { text: jQuery.map( items.split( ';' ), jQuery.trim ), typeDelay: 10, backDelay: 20, cursor: '|', delay: 1000, preserve: false, prefix: '', loop: 0 } ); } ); } ); function stickyHeader () { if (jQuery('.stricky').length) { var strickyScrollPos = 100; if(jQuery(window).scrollTop() > strickyScrollPos) { jQuery('.stricky').removeClass('fadeInUphalf fadeIn animated'); jQuery('.stricky').addClass('sticky-header stricky-fixed fadeInDown animated'); jQuery('body').addClass('fixed-navpoptin'); jQuery('.scroll-to-top').fadeIn(500); } else if(jQuery(this).scrollTop() <= strickyScrollPos) { jQuery('.stricky').removeClass('sticky-header stricky-fixed fadeInDown animated'); jQuery('.stricky').addClass('slideIn fadeInUphalf animated'); jQuery('body').removeClass('fixed-navpoptin'); jQuery('.scroll-to-top').fadeOut(500); } }; } jQuery(window).on("scroll", function () { (function ($) { stickyHeader(); })(jQuery); }); jQuery(document).on('click', '[data-toggle="lightbox"]', function(event) { event.preventDefault(); jQuery(this).ekkoLightbox(); }); jQuery(document).ready(function() { if(jQuery('#popups_video').length > 0 ){ jQuery('video').get(0).play(); } if(jQuery('#forms_video').length > 0 ){ jQuery('video').get(0).play(); } if(jQuery(".play-video-btn a").length>0){ jQuery(".play-video-btn a").poptinyoutube({ autoPlay:true, theme: "light" }); } //jQuery('a[href="#weglot_switcher"]').attr("href",""); jQuery('a[href="#weglot_switcher"]').on("click",function(){ return false; }); jQuery(".software-suggest a").attr("href","https://www.softwaresuggest.com/poptin"); if(jQuery(".rmp_menu_trigger").is(":visible")){ // var gtranslate_li = jQuery(".menu-item.menu-item-gtranslate").get(0).outerHTML; // jQuery(".menu-item.menu-item-gtranslate").remove(); var default_lang_mobile = jQuery(".gt-lang-code").text(); var sub_menu_lang =`