File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/chaty/views/admin/upgrade.php
<?php
/**
* Review Class
*
* @author : Premio <contact@premio.io>
* @license : GPL2
* */
if (defined('ABSPATH') === false) {
exit;
}
$proURL = "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=";
?>
<div class="wrap">
<div class="key-table">
<div class="modal-upgrade upgrade-block" id="folder-modal">
<div class="easy-modal-inner">
<div class="container">
<div class="pricing-table">
<div class="price-title"><?php esc_html_e("Unlock All Features", "chaty") ?></div>
<div class="pricing-table-header">
<div class="pricing-table-body">
<div class="pricing-table-content first active" data-option="1_year">
<div class="year-col"><?php esc_html_e("1 Year", "chaty") ?></div>
<div class="update-col"><?php esc_html_e("Updates & Support", "chaty") ?></div>
<div class="pricing-discount-col"></div>
</div>
<div class="pricing-table-content second" data-option="2_year">
<div class="year-col"><?php esc_html_e("2 Years", "chaty") ?></div>
<div class="update-col"><?php esc_html_e("Updates & Support", "chaty") ?></div>
<div class="pricing-discount-col"><span>32% off 😎</span></div>
</div>
<div class="pricing-table-content third" data-option="lifetime">
<div class="year-col"><?php esc_html_e("Lifetime", "chaty") ?></div>
<div class="update-col"><?php esc_html_e("Updates & Support", "chaty") ?></div>
<div class="pricing-discount-col"><span>63% off 🥳</span></div>
</div>
</div>
</div>
<div class="price-tables">
<div class="row">
<div class="col-md-4 col-sm-12">
<div class="price-table basic-feature">
<div class="price-table-top">
<div class="price-head">
<div class="plan-name">Basic</div>
<div class="plan-price">$49<span>/year</span></div>
</div>
<div class="plan-center">
<div class="price-permonth">Less than <b>$4.1</b>/mo · <b>Billed Annually</b></div>
<div class="price-offer">Renewals for <b>25% off</b></div>
</div>
</div>
<div class="price-table-middle">
<ul>
<li><a href="javascript:;" class="cus-tooltip">1 website <span class="has-tooltip">*</span><span class="tooltip__content">Use Chaty on 1 domain</span></a></li>
<li>
<a href="javascript:;" class="cus-tooltip">
Unlimited channels <span class="has-tooltip">*</span>
<span class="tooltip__content">Show up to 25 channels of your choice</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
<span class="html-tooltip dynamic last">
Multiple agents <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Show multiple agents under a single channel. For example, allow visitors to reach for pre-sales info or support with different channels on WhatsApp
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/agent-infotip.png") ?>">
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Choose a background color, change the size of the widget, choose from 3 different widget designs, select a Font Awesome icon or upload your own</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip html-tooltip-image has-image" data-image="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/chaty-chat-view.gif") ?>">
<span class="html-tooltip dynamic last">
Dynamic chat pop-up <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Choose between two types of pop-up designs, set pop-up text and color, and use merge tags like the URL and title, or WooCommerce properties like the product name, to customize the behavior of the widget based on visitor interaction.
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Channels customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Change each channel's background color, upload your own icon, and change the text on hover</span>
</a>
</li>
<li class="on-screen-pos">
<a href="javascript:;" class="cus-tooltip">
Multiple widgets <span class="has-tooltip">*</span>
<span class="tooltip__content">Create different widgets for different pages. Show different icons based on targeting rules. You can also show different channels for mobile and desktop and based on many other rules.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Custom location <span class="has-tooltip">*</span>
<span class="tooltip__content">Locate the widget exactly where you want by the pixel - X,Y</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Google Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Automatically track clicks on each of your channels on your Google Analytics account</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Page targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Use this feature to show or hide the widget for specific pages, posts, categories, tags, products, or any URL based on preset rules</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Available days and hours <span class="has-tooltip">*</span>
<span class="tooltip__content">Display the widget on specific days and hours based on your opening days and hours</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Country targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Target your widget to specific countries. You can create different widgets for different countries</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Traffic source targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Show the widget only to visitors who come from specific traffic sources including direct traffic, social networks, search engines, Google Ads, or any other traffic source</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Send leads to email <span class="has-tooltip">*</span>
<span class="tooltip__content">You can get the emails from your contact form directly to your emails and change the subject line</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Unlock analytics data about your Chaty widgets usage. Find out how many of your visitors click on your widgets and chat channels.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Date scheduling <span class="has-tooltip">*</span>
<span class="tooltip__content">Schedule the specific time and date when your Chaty widget appears. Use this feature to offer time-limited coupons, or to start a promotion from a specific date.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
And more <span class="has-tooltip">*</span>
<span class="tooltip__content">QR code for WeChat, customizable WhatsApp message, customizable email subject.</span>
</a>
</li>
</ul>
</div>
<div class="price-table-bottom">
<div class="custom-dd">
<select class="multiple-options">
<option data-per-month="4.1" data-option="1_year" data-header="Renewals for 25% off" data-price="49" value="<?php echo esc_url($proURL) ?>37">Updates & support for 1 year</option>
<option data-per-month="2.9" data-option="2_year" data-header="For 2 years" data-price="69" value="<?php echo esc_url($proURL) ?>38">Updates & support for 2 years</option>
<option data-per-month="0" data-option="lifetime" data-header="For lifetime" data-price="149" value="<?php echo esc_url($proURL) ?>39">Updates & support for lifetime</option>
</select>
</div>
<a class="cart-link" target="_blank" href="<?php echo esc_url($proURL)."37" ?>">Buy now</a>
</div>
<div class="bottom-position"></div>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="price-table plus-feature">
<div class="price-table-top">
<div class="price-head">
<div class="plan-name">Plus</div>
<div class="plan-price">$109<span>/year</span></div>
</div>
<div class="plan-center">
<div class="price-permonth">Less than <b>$9.1</b>/mo · <b>Billed Annually</b></div>
<div class="price-offer">Renewals for <b>25% off</b></div>
</div>
</div>
<div class="price-table-middle">
<ul>
<li><a href="javascript:;" class="cus-tooltip">5 websites <span class="has-tooltip">*</span><span class="tooltip__content">Use Chaty on 5 domains</span></a></li>
<li>
<a href="javascript:;" class="cus-tooltip">
Unlimited channels <span class="has-tooltip">*</span>
<span class="tooltip__content">Show up to 25 channels of your choice</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
<span class="html-tooltip dynamic last">
Multiple agents <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Show multiple agents under a single channel. For example, allow visitors to reach for pre-sales info or support with different channels on WhatsApp
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/agent-infotip.png") ?>">
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Choose a background color, change the size of the widget, choose from 3 different widget designs, select a Font Awesome icon or upload your own</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip html-tooltip-image has-image" data-image="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/chaty-chat-view.gif") ?>">
<span class="html-tooltip dynamic last">
Dynamic chat pop-up <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Choose between two types of pop-up designs, set pop-up text and color, and use merge tags like the URL and title, or WooCommerce properties like the product name, to customize the behavior of the widget based on visitor interaction.
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Channels customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Change each channel's background color, upload your own icon, and change the text on hover</span>
</a>
</li>
<li class="on-screen-pos">
<a href="javascript:;" class="cus-tooltip">
Multiple widgets <span class="has-tooltip">*</span>
<span class="tooltip__content">Create different widgets for different pages. Show different icons based on targeting rules. You can also show different channels for mobile and desktop and based on many other rules.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Custom location <span class="has-tooltip">*</span>
<span class="tooltip__content">Locate the widget exactly where you want by the pixel - X,Y</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Google Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Automatically track clicks on each of your channels on your Google Analytics account</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Page targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Use this feature to show or hide the widget for specific pages, posts, categories, tags, products, or any URL based on preset rules</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Available days and hours <span class="has-tooltip">*</span>
<span class="tooltip__content">Display the widget on specific days and hours based on your opening days and hours</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Country targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Target your widget to specific countries. You can create different widgets for different countries</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Traffic source targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Show the widget only to visitors who come from specific traffic sources including direct traffic, social networks, search engines, Google Ads, or any other traffic source</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Send leads to email <span class="has-tooltip">*</span>
<span class="tooltip__content">You can get the emails from your contact form directly to your emails and change the subject line</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Unlock analytics data about your Chaty widgets usage. Find out how many of your visitors click on your widgets and chat channels.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Date scheduling <span class="has-tooltip">*</span>
<span class="tooltip__content">Schedule the specific time and date when your Chaty widget appears. Use this feature to offer time-limited coupons, or to start a promotion from a specific date.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
And more <span class="has-tooltip">*</span>
<span class="tooltip__content">QR code for WeChat, customizable WhatsApp message, customizable email subject.</span>
</a>
</li>
</ul>
</div>
<div class="price-table-bottom">
<div class="custom-dd">
<select class="multiple-options">
<option data-per-month="9.1" data-option="1_year" data-header="Renewals for 25% off" data-price="109" value="<?php echo esc_url($proURL) ?>40">Updates & support for 1 year</option>
<option data-per-month="7.1" data-option="2_year" data-header="For 2 years" data-price="169" value="<?php echo esc_url($proURL) ?>41">Updates & support for 2 years</option>
<option data-per-month="" data-option="lifetime" data-header="For lifetime" data-price="279" value="<?php echo esc_url($proURL) ?>42">Updates & support for lifetime</option>
</select>
</div>
<a class="cart-link" target="_blank" href="<?php echo esc_url($proURL) ?>40">Buy now</a>
</div>
<div class="bottom-position"></div>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="price-table agency-feature">
<div class="price-table-top">
<div class="price-head">
<div class="plan-name">Agency</div>
<div class="plan-price">$179<span>/year</span></div>
</div>
<div class="plan-center">
<div class="price-permonth">Less than <b>$15</b>/mo · <b>Billed Annually</b></div>
<div class="price-offer">Renewals for <b>25% off</b></div>
</div>
</div>
<div class="price-table-middle" style="padding: 0">
<ul>
<li>
<div class="website-package">
<select class="multiple-web-options">
<option value="50_websites">50 websites</option>
<option value="500_websites">500 websites</option>
<option value="1000_websites">1000 websites</option>
</select>
</div>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Unlimited channels <span class="has-tooltip">*</span>
<span class="tooltip__content">Show up to 25 channels of your choice</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
<span class="html-tooltip dynamic last">
Multiple agents <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Show multiple agents under a single channel. For example, allow visitors to reach for pre-sales info or support with different channels on WhatsApp
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/agent-infotip.png") ?>">
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Choose a background color, change the size of the widget, choose from 3 different widget designs, select a Font Awesome icon or upload your own</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip html-tooltip-image has-image" data-image="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/chaty-chat-view.gif") ?>">
<span class="html-tooltip dynamic last">
Dynamic chat pop-up <span class="has-tooltip">*</span>
<span class="tooltip-text" style="">
Choose between two types of pop-up designs, set pop-up text and color, and use merge tags like the URL and title, or WooCommerce properties like the product name, to customize the behavior of the widget based on visitor interaction.
</span>
</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Channels customization <span class="has-tooltip">*</span>
<span class="tooltip__content">Change each channel's background color, upload your own icon, and change the text on hover</span>
</a>
</li>
<li class="on-screen-pos">
<a href="javascript:;" class="cus-tooltip">
Multiple widgets <span class="has-tooltip">*</span>
<span class="tooltip__content">Create different widgets for different pages. Show different icons based on targeting rules. You can also show different channels for mobile and desktop and based on many other rules.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Custom location <span class="has-tooltip">*</span>
<span class="tooltip__content">Locate the widget exactly where you want by the pixel - X,Y</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Google Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Automatically track clicks on each of your channels on your Google Analytics account</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Page targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Use this feature to show or hide the widget for specific pages, posts, categories, tags, products, or any URL based on preset rules</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Available days and hours <span class="has-tooltip">*</span>
<span class="tooltip__content">Display the widget on specific days and hours based on your opening days and hours</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Country targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Target your widget to specific countries. You can create different widgets for different countries</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Traffic source targeting <span class="has-tooltip">*</span>
<span class="tooltip__content">Show the widget only to visitors who come from specific traffic sources including direct traffic, social networks, search engines, Google Ads, or any other traffic source</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Send leads to email <span class="has-tooltip">*</span>
<span class="tooltip__content">You can get the emails from your contact form directly to your emails and change the subject line</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Widget Analytics <span class="has-tooltip">*</span>
<span class="tooltip__content">Unlock analytics data about your Chaty widgets usage. Find out how many of your visitors click on your widgets and chat channels.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
Date scheduling <span class="has-tooltip">*</span>
<span class="tooltip__content">Schedule the specific time and date when your Chaty widget appears. Use this feature to offer time-limited coupons, or to start a promotion from a specific date.</span>
</a>
</li>
<li>
<a href="javascript:;" class="cus-tooltip">
And more <span class="has-tooltip">*</span>
<span class="tooltip__content">QR code for WeChat, customizable WhatsApp message, customizable email subject.</span>
</a>
</li>
</ul>
</div>
<div class="price-table-bottom">
<div class="custom-dd">
<select class="multiple-options has-multiple-websites">
<option data-per-month="15" data-option="1_year" data-header="Renewals for 25% off" data-price="179" value="<?php echo esc_url($proURL) ?>43">Updates & support for 1 year</option>
<option data-per-month="11.7" data-option="2_year" data-header="For 2 years" data-price="279" value="<?php echo esc_url($proURL) ?>44">Updates & support for 2 years</option>
<option data-per-month="" data-option="lifetime" data-header="For lifetime" data-price="479" value="<?php echo esc_url($proURL) ?>45">Updates & support for lifetime</option>
</select>
</div>
<a class="cart-link" target="_blank" href="<?php echo esc_url($proURL) ?>43">Buy now</a>
</div>
<div class="bottom-position"></div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="text-center price-after">
<p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
<?php esc_html_e("30 days money back guaranteed", 'chaty'); ?>
</p>
<p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
<?php esc_html_e("The plugin will always keep working even if you don't renew your license", 'chaty'); ?>
</p>
<div class="payments">
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/payment.png") ?>" alt="Payment" class="payment-img" />
</div>
</div>
<div class="folder-testimonial-list">
<div class="folder-testimonial">
<div class="testimonial-image"> <img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/client-image.png") ?>"> </div>
<div class="testimonial-data">
<div class="testimonial-desc">Just installed chaty a couple days back. Was a bit skeptical. Then some leads came through via whatsapp on my site haha. Sold</div>
<div class="testimonial-author">Deepak Shukla <small>pearllemon</small></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/js/select2.min.js?ver=".CHT_VERSION) ?>" type="text/javascript" ></script>
<script>
(function (factory) {
"use strict";
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
}
else if(typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('jquery'));
}
else {
factory(jQuery);
}
}(function ($, undefined) {
var priceOptions = {
"50_websites": {
"1_year": {
"price": 179,
"per_month":15,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=43"
},
"2_year": {
"price": 279,
"per_month":11.7,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=44"
},
"lifetime": {
"price": 479,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=45"
}
},
"500_websites": {
"1_year": {
"price": 349,
"per_month":29.1,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=46"
},
"2_year": {
"price": 519,
"per_month":21.7,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=47"
},
"lifetime": {
"price": 869,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=48"
}
},
"1000_websites": {
"1_year": {
"price": 479,
"per_month":40,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=49"
},
"2_year": {
"price": 729,
"per_month":30.4,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=50"
},
"lifetime": {
"price": 1199,
"link": "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=51"
}
}
};
$(document).ready(function(){
$(document).on("click", ".pricing-table-content", function(){
if(!$(this).hasClass("active")) {
$(".pricing-table-content").removeClass("active");
$(this).addClass("active");
var datFor = $(this).data("option");
$(".multiple-options").each(function(){
$(this).find("option").prop("selected", false);
$(this).find("option[data-option='"+datFor+"']").prop("selected", true);
$(this).trigger("change");
})
}
});
$(document).on("mouseover", ".html-tooltip-image.has-image", function(){
if($(this).hasClass("has-image")) {
$(this).removeClass("has-image");
var imgURL = $(this).data("image");
console.log(imgURL);
$(this).find(".tooltip-text").append("<img src='"+imgURL+"' alt='Chaty' />");
}
});
if($(".multiple-options").length) {
$(".multiple-options").select2({
minimumResultsForSearch: -1
});
}
if($(".multiple-web-options").length) {
$(".multiple-web-options").select2({
minimumResultsForSearch: -1
});
}
$(document).on("change", ".multiple-options", function(){
priceText = $(this).find("option:selected").attr("data-header");
thisValue = $(this).val();
thisPrice = $(this).find("option:selected").attr("data-price");
thisperMonth = $(this).find("option:selected").attr("data-per-month");
if(!$(this).hasClass("has-multiple-websites")) {
$(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
$(this).closest(".price-table").find(".plan-price").text("$" + thisPrice);
} else {
var webOption = $(".multiple-web-options").val();
var priceSettings = priceOptions[webOption];
var yearPlan = $(".multiple-options.has-multiple-websites option:selected").attr("data-option");
if(priceSettings[yearPlan] != undefined) {
priceSettings = priceSettings[yearPlan];
thisValue = priceSettings.link;
thisPrice = priceSettings.price;
thisperMonth = priceSettings.per_month;
}
}
thisOption = $(this).find("option:selected").attr("data-option");
if(thisOption == "1_year") {
thisPrice = thisPrice+"<span>/year</span>";
per_month = "Less than <b>$" + thisperMonth + "</b>/mo · <b>Billed Annually</b>";
priceText = "Renewals for <b>25% off</b>";
} else if(thisOption == "2_year") {
thisPrice = thisPrice+"<span>/2 years</span>";
per_month = "Less than <b>$" + thisperMonth + "</b>/mo · <b>Billed Annually</b>";
priceText = "Renewals for <b>25% off</b>";
} else {
thisPrice = thisPrice+"<span>/lifetime</span>";
per_month = "<b>Best value</b>";
priceText = "For lifetime";
}
$(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
$(this).closest(".price-table").find(".plan-price").html("$" + thisPrice);
$(this).closest(".price-table").find(".price-offer").html(priceText);
$(this).closest(".price-table").find(".price-permonth").html(per_month);
if ( per_month == '' ) {
$(this).closest(".price-table").find(".price-permonth").hide();
} else {
$(this).closest(".price-table").find(".price-permonth").show();
}
});
$(document).on("change", ".multiple-web-options", function(){
$(".multiple-options.has-multiple-websites").trigger("change");
});
if($(".multiple-options.has-multiple-websites").length) {
$(".multiple-options.has-multiple-websites").trigger("change");
}
checkForPricingPos();
});
$(window).on("scroll", function(){
checkForPricingPos();
});
$(window).on("resize", function(){
checkForPricingPos();
});
function checkForPricingPos() {
$(".bottom-position").each(function(){
if($(this).closest(".price-table").find(".on-screen-pos").length) {
var toolPos = $(this).closest(".price-table").find(".on-screen-pos").offset().top - $(window).scrollTop() - $(window).height();
if(toolPos < 0) {
if ($(this).offset().top - $(window).scrollTop() - $(window).height() < -3) {
$(this).closest(".price-table").removeClass("is-fixed");
$(this).closest(".price-table").find(".price-table-bottom").prop("style", "");
} else {
$(this).closest(".price-table").addClass("is-fixed");
$(this).closest(".price-table").find(".price-table-bottom").css("top", ($(window).height() - 125) + "px");
$(this).closest(".price-table").find(".price-table-bottom").css("left", $(this).offset().left + "px");
$(this).closest(".price-table").find(".price-table-bottom").outerWidth($(this).closest(".price-table").width());
}
} else {
$(this).closest(".price-table").removeClass("is-fixed");
$(this).closest(".price-table").find(".price-table-bottom").prop("style", "");
}
}
});
setTooltipPosition();
}
function setTooltipPosition() {
if($(".html-tooltip:not(.no-position)").length) {
$(".html-tooltip:not(.no-position)").each(function(){
if($(this).offset().top - $(window).scrollTop() > 540) {
$(this).addClass("top").removeClass("side").removeClass("bottom");
$(this).find(".tooltip-text").attr("style","");
$(this).find(".tooltip-text").removeClass("hide-arrow");
} else if($(window).height() - ($(this).offset().top - $(window).scrollTop()) > 460) {
$(this).addClass("bottom").removeClass("top").removeClass("side");
$(this).find(".tooltip-text").attr("style","");
$(this).find(".tooltip-text").removeClass("hide-arrow");
} else {
$(this).addClass("side").removeClass("top").removeClass("bottom");
if($(this).find(".tooltip-text").length) {
$(this).find(".tooltip-text").attr("style","");
$(this).find(".tooltip-text").removeClass("hide-arrow");
if($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50 < 0) {
$(this).find(".tooltip-text").css("margin-top", Math.abs($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50)+"px");
$(this).find(".tooltip-text").addClass("hide-arrow");
} else {
$(this).find(".tooltip-text").attr("style","");
if(($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) > 0) {
$(this).find(".tooltip-text").css("margin-top", ((-1)*Math.abs($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) - 10)+"px");
$(this).find(".tooltip-text").addClass("hide-arrow");
}
}
}
}
});
}
}
}));
</script>