2015-09-01 14:52:06 -04:00
|
|
|
$(function () {
|
2015-06-24 08:03:53 -07:00
|
|
|
$("#newsletter").validate();
|
|
|
|
|
2015-01-22 13:55:45 -05:00
|
|
|
var ads = [
|
2016-10-24 12:01:53 -04:00
|
|
|
{
|
2017-10-01 23:51:58 -04:00
|
|
|
quote: "Get 2,000+ icons with Font Awesome Pro and <strong>ALL</strong> KS rewards for just $60!",
|
2016-12-22 15:54:15 -05:00
|
|
|
class: "fa5",
|
2017-12-07 11:09:30 -06:00
|
|
|
url: "https://fontawesome.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_campaign=fa5_released&utm_content=banner",
|
2017-10-01 23:51:58 -04:00
|
|
|
btn_text: "Check out FA Pro <i class='fas fas-external-link'></i>",
|
2016-10-24 12:01:53 -04:00
|
|
|
},
|
2015-01-22 13:55:45 -05:00
|
|
|
];
|
|
|
|
|
2017-12-07 11:09:30 -06:00
|
|
|
// selectAd();
|
2015-01-22 13:55:45 -05:00
|
|
|
|
2013-05-10 12:00:01 -04:00
|
|
|
// start the icon carousel
|
2013-10-23 11:12:39 -04:00
|
|
|
$('#icon-carousel').carousel({
|
2013-05-10 12:00:01 -04:00
|
|
|
interval: 5000
|
|
|
|
});
|
2015-01-22 13:55:45 -05:00
|
|
|
|
2016-01-08 18:03:37 -05:00
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
2015-06-23 22:39:03 -07:00
|
|
|
$('[data-toggle="popover"]').popover();
|
2016-10-25 12:34:36 -04:00
|
|
|
|
2017-12-07 11:09:30 -06:00
|
|
|
if (storageAvailable('localStorage') && !localStorage.seenFA5ReleasedModal) {
|
2016-12-02 12:03:45 -05:00
|
|
|
$('#modal-fa5')
|
2016-10-25 12:34:36 -04:00
|
|
|
.modal('toggle')
|
|
|
|
.on('hidden.bs.modal', function (e) {
|
2016-12-02 12:03:45 -05:00
|
|
|
$('#fa5-iframe').remove();
|
2016-10-25 12:34:36 -04:00
|
|
|
});
|
|
|
|
;
|
2016-10-24 12:01:53 -04:00
|
|
|
}
|
2015-06-23 22:39:03 -07:00
|
|
|
|
2016-10-24 12:01:53 -04:00
|
|
|
if (storageAvailable('localStorage')) {
|
2017-12-07 11:09:30 -06:00
|
|
|
localStorage.seenFA5ReleasedModal = true;
|
2016-10-24 12:01:53 -04:00
|
|
|
// Yippee! We can use localStorage awesomeness
|
|
|
|
}
|
|
|
|
|
|
|
|
function storageAvailable(type) {
|
|
|
|
try {
|
|
|
|
var storage = window[type],
|
|
|
|
x = '__storage_test__';
|
|
|
|
storage.setItem(x, x);
|
|
|
|
storage.removeItem(x);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
catch(e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2016-11-29 17:11:33 -05:00
|
|
|
|
2016-03-10 13:49:53 -05:00
|
|
|
function selectAd() {
|
2015-09-01 14:52:06 -04:00
|
|
|
random_number = Math.floor(Math.random() * ads.length);
|
2015-01-22 13:55:45 -05:00
|
|
|
random_ad = ads[random_number];
|
|
|
|
|
2015-03-24 10:36:15 -04:00
|
|
|
$('#banner').addClass(random_ad.class);
|
2015-01-22 13:55:45 -05:00
|
|
|
$('#rotating-message').html(random_ad.quote);
|
2015-03-24 10:36:15 -04:00
|
|
|
$('#rotating-url').attr("href", random_ad.url);
|
|
|
|
$('#rotating-url').html(random_ad.btn_text);
|
|
|
|
$('#banner').collapse('show');
|
2015-01-22 13:55:45 -05:00
|
|
|
}
|
2013-05-10 12:00:01 -04:00
|
|
|
});
|