site.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. $(function () {
  2. $("#newsletter").validate();
  3. var ads = [
  4. {
  5. quote: "Take your icon game to the next level. Check out <strong>Fonticons</strong>, from the maker of Font Awesome.",
  6. class: "fonticons",
  7. url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_1_next_level&utm_campaign=promo_4.4_update",
  8. btn_text: "Gimme Some!"
  9. },
  10. {
  11. quote: "Make your icons load 10x faster! Check out <strong>Fonticons</strong>, from the maker of Font Awesome.",
  12. class: "fonticons",
  13. url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_3_faster_loading&utm_campaign=promo_4.4_update",
  14. btn_text: "Gimme Some!"
  15. },
  16. {
  17. quote: "Looking for other great icon sets? Check out <strong>Fonticons</strong>, from the maker of Font Awesome.",
  18. class: "fonticons",
  19. url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_4_more_icons&utm_campaign=promo_4.4_update",
  20. btn_text: "Gimme Some!"
  21. },
  22. {
  23. quote: "Want to add your own icon? Check out <strong>Fonticons</strong>, from the maker of Font Awesome.",
  24. class: "fonticons",
  25. url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_your_own_icon&utm_campaign=promo_4.4_update",
  26. btn_text: "Gimme Some!"
  27. },
  28. {
  29. quote: "<strong>Black Tie</strong>, from the creator of Font Awesome. On sale at the Kickstarter price for a limited time.",
  30. class: "black-tie",
  31. url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_2_kickstarter&utm_campaign=promo_4.4_update",
  32. btn_text: "Check it Out!"
  33. },
  34. {
  35. quote: "Want clean, minimalist icons? Check out <strong>Black Tie</strong>, the new multi-weight icon font from the maker of Font Awesome.",
  36. class: "black-tie",
  37. url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_5_clean_minimalist&utm_campaign=promo_4.4_update",
  38. btn_text: "Check it Out!"
  39. },
  40. {
  41. quote: "Want a different icon look? Check out <strong>Black Tie</strong>, our new multi-weight icon set.",
  42. class: "black-tie",
  43. url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_different_look&utm_campaign=promo_4.4_update",
  44. btn_text: "Check it Out!"
  45. },
  46. {
  47. quote: "Check out <strong>Black Tie</strong>, our new multi-weight icon set!",
  48. class: "black-tie",
  49. url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_7_our_new_multi_weight&utm_campaign=promo_4.4_update",
  50. btn_text: "Check it Out!"
  51. }
  52. ];
  53. //selectFonticonsAd();
  54. // start the icon carousel
  55. $('#icon-carousel').carousel({
  56. interval: 5000
  57. });
  58. $('[data-toggle="tooltip"]').tooltip();
  59. $('[data-toggle="popover"]').popover();
  60. function selectFonticonsAd() {
  61. random_number = Math.floor(Math.random() * ads.length);
  62. random_ad = ads[random_number];
  63. $('#banner').addClass(random_ad.class);
  64. $('#rotating-message').html(random_ad.quote);
  65. $('#rotating-url').attr("href", random_ad.url);
  66. $('#rotating-url').html(random_ad.btn_text);
  67. $('#banner').collapse('show');
  68. }
  69. });