Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onTemplateLoad(a) {
  2.   player = brightcove.api.getExperience(a), videoAPI = brightcove.api.modules.APIModules, "function" == typeof rdm_analytics_brightcove_load_handler && rdm_analytics_brightcove_load_handler(a), brightcoveResize()
  3. }
  4.  
  5. function onTemplateReady() {
  6.   videoPlayer = player.getModule(videoAPI.VIDEO_PLAYER), adModule = player.getModule(videoAPI.ADVERTISING), experienceModule = player.getModule(videoAPI.EXPERIENCE), videoPlayer.addEventListener(brightcove.api.events.MediaEvent.COMPLETE, onVideoCompletion), "false" != brightcoveComponent.disableSyndicated || adServerURLHasChanged || adModule.getAdPolicy(getAdPolicyHandler)
  7. }
  8.  
  9. function getAdPolicyHandler(a) {
  10.   var b = brightcoveComponent.syndicator;
  11.   "" != brightcoveComponent.adServerURL && (a.adServerURL = brightcoveComponent.adServerURL), a.adServerURL = changeIUInAdServerURL(a.adServerURL, b, 5, "video"), adModule.setAdPolicy(a, setAdPolicyHandler)
  12. }
  13.  
  14. function setAdPolicyHandler() {}
  15.  
  16. function onComplete() {}
  17.  
  18. function brightcoveResize() {
  19.   if ("undefined" != typeof experienceModule && experienceModule) {
  20.     var a = jQuery(".video-player-container").width(),
  21.       b = jQuery(".video-player-container").outerHeight();
  22.     "html" == experienceModule.experience.type && (experienceModule.setSize(a, b), jQuery(".video-player-container iframe").css("height", b + "px"))
  23.   }
  24. }
  25.  
  26. function changeIUInAdServerURL(a, b, c, d) {
  27.   for (var e = a.split("?"), f = e[1], g = f.split("&"), h = "", i = 0, j = 0; j < g.length; j++)
  28.     if (g[j].indexOf("iu") >= 0) {
  29.       h = g[j].split("=")[1], i = j;
  30.       break
  31.     }
  32.   h = decodeURIComponent(h), "/" == h.charAt(0) && (h = h.substring(1));
  33.   var k = h.split("/");
  34.   if (brightcoveComponent.iuOverride) {
  35.     for (var l = brightcoveComponent.iuOverride.split("/"), m = [k[0]], j = 0; j < l.length; j++) m.push(l[j]);
  36.     k = m
  37.   }
  38.   if ("" != brightcoveComponent.iu) {
  39.     var n = brightcoveComponent.iu;
  40.     n = n.split("/");
  41.     for (var j = 0; j < n.length; j++) k.push(n[j])
  42.   }
  43.   if ("" != b && "" != d && k.length <= c) {
  44.     for (var o = c - k.length, j = 0; o > j; j++) k.push(d);
  45.     k.push(b)
  46.   }
  47.   var p = "/" + k.join("/");
  48.   g[i] = "iu=" + encodeURIComponent(p);
  49.   var q = g.join("&");
  50.   return e[1] = q, adServerURLHasChanged = !0, e.join("?")
  51. }
  52.  
  53. function rdm_curated_author_widget_get_content(a, b) {
  54.   var c = rdm_curated_author_widget_number_of_pages;
  55.   b && (c = Math.ceil(c / 2)), jQuery(".curated_author_total_page").html(c), jQuery(".author-list ul li").hide(), jQuery(".author-list ul li.page_" + a).show();
  56.   var d = a;
  57.   b && (d = Math.ceil(a / 2)), jQuery("div.author-list-controls span.curated_author_current_page").html(d), 1 >= a ? jQuery("div.author-list-controls span.left-arrow").addClass("disabled") : jQuery("div.author-list-controls span.left-arrow").removeClass("disabled"), a >= rdm_curated_author_widget_number_of_pages || b && a >= rdm_curated_author_widget_number_of_pages + 1 ? jQuery("div.author-list-controls span.right-arrow").addClass("disabled") : jQuery("div.author-list-controls span.right-arrow").removeClass("disabled")
  58. }
  59.  
  60. function rdm_curated_author_widget_is_in_tablet() {
  61.   return Modernizr.mq("only screen and (max-width: 1007px) and (min-width: 768px)")
  62. }
  63.  
  64. function setContainerHeight() {
  65.   var a = jQuery(".featured-stories-wrapper.fullwidth-container"),
  66.     b = jQuery(".featured-stories-wrapper.fullwidth-container .slotholder img");
  67.   jQuery(a).css("height", b.height())
  68. }
  69.  
  70. function checkDisableScrolling() {
  71.   var a = jQuery(".gallery-slide-container").data("disablescrolling");
  72.   if (1 == a) {
  73.     var b = jQuery(window.top).height() - 50;
  74.     jQuery(".gallery-slide-content > img").css("max-height", b + "px"), jQuery(".gallery-slide-content > img").css("width", "auto")
  75.   }
  76. }
  77.  
  78. function toggleShareOverlay() {
  79.   jQuery(".gallery-social-wrapper").hasClass("open") ? closeShare() : openShare()
  80. }
  81.  
  82. function openShare() {
  83.   jQuery(".gallery-social-wrapper .share-buttons").slideDown(), jQuery("a.gallery-icon.gallery-slide-share").css("display", "none"), jQuery("a.gallery-button.gallery-slides-share-close").css("display", "inline-block"), jQuery(".gallery-social-wrapper").addClass("open")
  84. }
  85.  
  86. function setShareOverlayPosition() {
  87.   jQuery(".gallery-social-wrapper").css("right", Math.round((jQuery(".gallery-slide-content").width() - jQuery(".gallery-slide-content img").width()) / 2) + "px")
  88. }
  89.  
  90. function setCaptionPosition() {
  91.   jQuery(".gallery-slide-information-slide-caption").css("right", Math.round((jQuery(".gallery-slide-content").width() - jQuery(".gallery-slide-content img").width()) / 2) + "px")
  92. }
  93.  
  94. function closeShare() {
  95.   jQuery(".gallery-social-wrapper .share-buttons").slideUp(), jQuery("a.gallery-button.gallery-slides-share-close").css("display", "none"), jQuery("a.gallery-icon.gallery-slide-share").css("display", "inline-block"), jQuery(".gallery-social-wrapper").removeClass("open")
  96. }
  97.  
  98. function rdm_recipes_auto_update_search() {
  99.   recipesFilterToolAjaxCall && 4 != recipesFilterToolAjaxCall.readystate && recipesFilterToolAjaxCall.abort();
  100.   var a = (Date.now(), jQuery("#recipeFilterToolForm").serializeArray());
  101.   a.push({
  102.     name: "page",
  103.     value: 1
  104.   });
  105.   var b = jQuery("input[name='template_directory_uri']").val(),
  106.     c = b + "/ComponentControllers/RecipeSearchResultsComponent/ajax.getAllSearchInfo.php";
  107.   recipesFilterToolAjaxCall = jQuery.ajax({
  108.     url: c,
  109.     type: "POST",
  110.     data: a,
  111.     success: function(a) {
  112.       jQuery("#recipe_search_load_more").show(), a.indexOf("--hidebutton") >= 0 ? (jQuery("#recipe_search_load_more").hide(), a = a.replace("--hidebutton", "")) : jQuery("#recipe_search_load_more").show(), recipesFilterToolAjaxCall = !1, searchPaginationPage = 2;
  113.       var b = JSON.parse(a),
  114.         c = b.recipeCount,
  115.         d = b.status,
  116.         e = (b.hasSolrFilters, b.riverOfContent),
  117.         f = b.keyword,
  118.         g = "",
  119.         h = !1;
  120.       jQuery("#recipe_filter_tool_sponsor").show(), jQuery(".total_search_result_container").removeClass("recipe_result_error"), d > 0 ? 0 == c ? (g = 2 == d ? "Sorry we did not find results to match. Please refine your search below." : "Sorry we did not find results for <span class='total_search_result'>\"" + f + '"</span>. Please refine your search below.', h = !0) : c >= 1 && (g = "<span class='total_search_result'>" + c + "</span> recipe", c > 1 && (g += "s")) : 0 > d ? (g = "Error while searching, please come back later.", h = !0) : (g = "A search keyword must be entered", h = !0), h && (jQuery("#recipe_filter_tool_sponsor").hide(), jQuery(".total_search_result_container").addClass("recipe_result_error")), jQuery("#recipe_search_message").html(g), jQuery("#recipe_search_flex_grid").html(e)
  121.     },
  122.     error: function() {
  123.       console.log("error")
  124.     }
  125.   })
  126. }
  127.  
  128. function rdm_recipes_adjust_content_height() {
  129.   jQuery("#main .content").height(jQuery(".filter_tool_container").height() + 250)
  130. }
  131.  
  132. function rdm_recipes_add_filter(a, b, c, d) {
  133.   return jQuery("#recipe_selected_filters").children("#" + a + "_selected").length > 0 ? !1 : (jQuery("#recipe_selected_filters").append("<div class='selected_filter " + b + "' id='" + a + "_selected'>" + c + " <span class='filter_remove'></span><input type='hidden' name='ids[]' value='" + a + "' /><input type='hidden' name='labels[]' value='" + c + "' /><input type='hidden' name='fq[]' value='" + d + "' /></div>"), !0)
  134. }
  135.  
  136. function rdmRecipeSuggestionToolAssignIngredient() {
  137.   var a = "ingredients:" + jQuery("#recipe_suggestion_tool_ingredient").val(),
  138.     b = jQuery("#recipe_suggestion_tool_ingredient").val(),
  139.     c = "ingredient_" + jQuery("#recipe_suggestion_tool_ingredient").val().replace(" ", "_");
  140.   jQuery("#recipe_suggestion_tool_ingredient_id").val(c), jQuery("#recipe_suggestion_tool_ingredient_fq").val(a), jQuery("#recipe_suggestion_tool_ingredient_label").val(b)
  141. }
  142.  
  143. function rdmRecipeSuggestionToolAssignMealType() {
  144.   var a = jQuery("#recipe_suggestion_tool_meal_type").find("option:selected").attr("data-search"),
  145.     b = jQuery("#recipe_suggestion_tool_meal_type").find("option:selected").text(),
  146.     c = jQuery("#recipe_suggestion_tool_meal_type").find("option:selected").val(),
  147.     d = jQuery("#recipe_suggestion_tool_meal_type").find("option:selected").attr("class"),
  148.     e = "ul.recipe_suggestion_tool_meal_type_drop li#" + d;
  149.   jQuery("ul.recipe_suggestion_tool_meal_type_drop").find("li").removeClass("checked"), jQuery(e).addClass("checked");
  150.   var f = jQuery("div.recipe_suggestion_tool_meal_type_drop div");
  151.   f.text(b), f.attr("data-value", c), f.attr("data-search", a), jQuery("#recipe_suggestion_tool_meal_type_id").val(c), jQuery("#recipe_suggestion_tool_meal_type_fq").val(a), jQuery("#recipe_suggestion_tool_meal_type_label").val(b)
  152. }
  153.  
  154. function rdmRecipeSuggestionToolAssignMealTypeList(a, b, c) {
  155.   jQuery("#recipe_suggestion_tool_meal_type_id").val(a), jQuery("#recipe_suggestion_tool_meal_type_fq").val(b), jQuery("#recipe_suggestion_tool_meal_type_label").val(c)
  156. }
  157.  
  158. function rdmRecipeSuggestionToolInvalidateIngredient() {
  159.   jQuery("#recipe_suggestion_tool_ingredient_id").remove(), jQuery("#recipe_suggestion_tool_ingredient_fq").remove(), jQuery("#recipe_suggestion_tool_ingredient_label").remove()
  160. }
  161.  
  162. function rdmRecipeSuggestionToolInvalidateMealType() {
  163.   jQuery("#recipe_suggestion_tool_meal_type_id").remove(), jQuery("#recipe_suggestion_tool_meal_type_fq").remove(), jQuery("#recipe_suggestion_tool_meal_type_label").remove()
  164. }
  165.  
  166. function rdmRecipeMealTypeDropDownMenu(a) {
  167.   var b = a("div.recipe_suggestion_tool_meal_type_drop div");
  168.   a("ul.recipe_suggestion_tool_meal_type_drop li").click(function() {
  169.     var c = a(this).attr("data-value"),
  170.       d = a(this).attr("data-search"),
  171.       e = a(this).text(),
  172.       f = a(this).attr("id");
  173.     a(this).siblings().removeClass("checked"), a("#recipe_suggestion_tool_meal_type").find("option:selected").removeAttr("selected"), a(this).addClass("checked");
  174.     var g = "#recipe_suggestion_tool_meal_type option." + f;
  175.     a(g).attr("selected", "selected"), b.text(e), b.attr("data-value", c), b.attr("data-search", d), rdmRecipeSuggestionToolAssignMealTypeList(c, d, e)
  176.   })
  177. }
  178.  
  179. function rdm_foundation_comment_button_click() {
  180.   var a = jQuery;
  181.   a("#comment-block, .comment-block").slideToggle(), a(".comment-block").toggleClass("display"), a(".lblShowComments").toggleClass("display"), a(".lblHideComments").toggleClass("display"), a("html, body").animate({
  182.     scrollTop: a("#comment-block").offset().top
  183.   }, 1e3), 0 == window.commentbool ? window.commentbool = !0 : 1 == window.commentbool && (window.commentbool = !1)
  184. }
  185.  
  186. function updade_ads_positions(a) {
  187.   for (var b = new Array, c = 0; c < oldTotalBoxes.length; c++) b.push(a[0] + oldTotalBoxes[c]), b.push(a[1] + oldTotalBoxes[c]);
  188.   return b
  189. }
  190.  
  191. function rdm_foundation_swap_boxes(a) {
  192.   a = a || !1;
  193.   var b, c = jQuery;
  194.   if (b = rdm_foundation_store_content_boxes(), a || c(window).height() != parseInt(window.lastWindowHeight) || c(window).width() != parseInt(window.lastWindowWidth) || window.rdm_firstLoad) {
  195.     window.lastWindowHeight = c(window).height(), window.lastWindowWidth = c(window).width(), window.rdm_firstLoad = !1;
  196.     var d = new Array,
  197.       e = 0,
  198.       f = 0,
  199.       g = 0,
  200.       h = 0,
  201.       i = c(".swap-box").length,
  202.       j = 0;
  203.     if ("undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 767px) and (min-width: 321px)") ? (d = [4, 7], d = updade_ads_positions(d)) : "undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 1007px) and (min-width: 768px)") ? (d = [4, 8], d = updade_ads_positions(d)) : "undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 1264px) and (min-width: 1008px)") || jQuery.browser.msie && parseInt(jQuery.browser.version) < 9 ? (d = [3, 9], d = updade_ads_positions(d)) : (d = [4, 10], d = updade_ads_positions(d)), c(".swap-box").each(function() {
  204.         if (c(this).hasClass("ad-box")) {
  205.           if (c(this).hasClass("multi")) {
  206.             c(this).removeClass("multi-short"), c(this).removeClass("multi-long");
  207.             for (var a = 0, k = 0, l = new Array("[id^=multi_ad_hp_bb]", "[id^=multi_ad_hp_bb] a", "[id^=multi_ad_hp_bb] iframe", "[id^=multi_ad_hp_bb] object", "[id^=multi_ad_hp_bb] ins", "[id^=multi_ad_hp_bb] img", "[id^=multi_ad_hp_bb] embed", "[id^=multi_ad_hp_bb] table", "[id^=multi_ad_hp_bb] div", "aside ins"), m = 0; m < l.length; m++) k = parseInt(c(this).find(l[m]).height()), isNaN(k) && (k = 0), k > a && (a = k);
  208.             c(this).addClass(isNaN(a) || a > 305 ? "multi-long" : "multi-short")
  209.           }
  210.           lastAdBox = this;
  211.           for (var n = d[e] - (f + 1 + h), o = 1; n >= o; o++) c(lastAdBox).before(b[f]), f++, j++;
  212.           h++, e++, j++
  213.         } else i > j && (c(this).remove(), g++)
  214.       }), f < b.length)
  215.       for (f; f < b.length; f++) c(".swap-box").last().after(b[f]);
  216.     else f == b.length && (f + 1 == d[0] ? c("#ad-box-1+.box").remove() : c("#ad-box-2+.box").remove())
  217.   }
  218.   dfd.resolve()
  219. }
  220. jQuery(document).ready(function(a) {
  221.   a("ul.breadcrumbs.dropdown li").not(".parent").not(".current").not(".current-menu-item").delay(200).animate({
  222.     height: "toggle"
  223.   }), a("ul.breadcrumbs.dropdown li.parent").click(function(b) {
  224.     a(this).toggleClass("push"), a("ul.breadcrumbs.dropdown li").not(".parent").not(".current").not(".current-menu-item").animate({
  225.       height: "toggle"
  226.     }), b.preventDefault()
  227.   }).delay(500).toggleClass("push", "slow")
  228. });
  229. var player, videoAPI, videoPlayer, experienceModule, adModule, adServerURLHasChanged = !1;
  230. jQuery(window).resize(function() {
  231.     brightcoveResize()
  232.   }),
  233.   function(a) {
  234.     "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
  235.   }(function(a) {
  236.     function b(a) {
  237.       return h.raw ? a : encodeURIComponent(a)
  238.     }
  239.  
  240.     function c(a) {
  241.       return h.raw ? a : decodeURIComponent(a)
  242.     }
  243.  
  244.     function d(a) {
  245.       return b(h.json ? JSON.stringify(a) : String(a))
  246.     }
  247.  
  248.     function e(a) {
  249.       0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
  250.       try {
  251.         return a = decodeURIComponent(a.replace(g, " ")), h.json ? JSON.parse(a) : a
  252.       } catch (b) {}
  253.     }
  254.  
  255.     function f(b, c) {
  256.       var d = h.raw ? b : e(b);
  257.       return a.isFunction(c) ? c(d) : d
  258.     }
  259.     var g = /\+/g,
  260.       h = a.cookie = function(e, g, i) {
  261.         if (void 0 !== g && !a.isFunction(g)) {
  262.           if (i = a.extend({}, h.defaults, i), "number" == typeof i.expires) {
  263.             var j = i.expires,
  264.               k = i.expires = new Date;
  265.             k.setTime(+k + 864e5 * j)
  266.           }
  267.           return document.cookie = [b(e), "=", d(g), i.expires ? "; expires=" + i.expires.toUTCString() : "", i.path ? "; path=" + i.path : "", i.domain ? "; domain=" + i.domain : "", i.secure ? "; secure" : ""].join("")
  268.         }
  269.         for (var l = e ? void 0 : {}, m = document.cookie ? document.cookie.split("; ") : [], n = 0, o = m.length; o > n; n++) {
  270.           var p = m[n].split("="),
  271.             q = c(p.shift()),
  272.             r = p.join("=");
  273.           if (e && e === q) {
  274.             l = f(r, g);
  275.             break
  276.           }
  277.           e || void 0 === (r = f(r)) || (l[q] = r)
  278.         }
  279.         return l
  280.       };
  281.     h.defaults = {}, a.removeCookie = function(b, c) {
  282.       return void 0 === a.cookie(b) ? !1 : (a.cookie(b, "", a.extend({}, c, {
  283.         expires: -1
  284.       })), !a.cookie(b))
  285.     }
  286.   }), jQuery(document).ready(function() {
  287.     var a = 1e3,
  288.       b = 0;
  289.     "undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 767px)") && (a = 200, jQuery("ul.related-videos-menu").prepend(jQuery(".related-videos-menu li.current"))), "undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 1007px) and (min-width:768px)") && (a = 450), ("undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 1264px) and (min-width:1008px)") || jQuery.browser.msie && 8 === parseInt(jQuery.browser.version, 10)) && (a = 800), jQuery(".related-videos-menu li").each(function() {
  290.       b = b + jQuery(this).width() + 10, "undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 767px)") ? (jQuery(".subMenuTab").addClass("visible"), jQuery(this).addClass("subMenuCategory"), jQuery(this).hasClass("subMenuTab") || jQuery(this).appendTo(jQuery(".subMenuContainer")), jQuery("ul.related-videos-menu").prepend(jQuery(".related-videos-menu li.current"))) : b > a && (jQuery(".subMenuTab").addClass("visible"), jQuery(this).addClass("subMenuCategory"), jQuery(this).hasClass("subMenuTab") || jQuery(this).appendTo(jQuery(".subMenuContainer")))
  291.     }), jQuery(".subMenuTab").click(function() {
  292.       jQuery(this).hasClass("active") ? (jQuery(this).removeClass("active"), jQuery(".subMenuContainer").slideUp()) : (jQuery(this).addClass("active"), jQuery(".subMenuContainer").slideDown())
  293.     })
  294.   }), jQuery(document).ready(function(a) {
  295.     a(".comment_bubble").click(function() {
  296.       a("#comment-block, .comment-block").slideDown(), a(".comment-block").addClass("display"), 0 == window.commentbool && (a(".lblShowComments").removeClass("display"), a(".lblHideComments").addClass("display"));
  297.       var b;
  298.       return a("div[name='#comment-block']").each(function() {
  299.         return a(this).is(":visible") ? (b = a(this), !1) : !0
  300.       }), a("html, body").animate({
  301.         scrollTop: a("#comment-block").offset().top
  302.       }, 1e3), window.commentbool = !0, !1
  303.     })
  304.   });
  305. var rdm_curated_author_widget_number_of_pages = parseInt(jQuery(".curated_author_total_page").html());
  306. jQuery(document).ready(function() {
  307.     var a = parseInt(jQuery(".curated_author_current_page").html()),
  308.       b = rdm_curated_author_widget_is_in_tablet();
  309.     rdm_curated_author_widget_get_content(a, b), jQuery(window).resize(function() {
  310.       rdm_curated_author_widget_is_in_tablet() != b && (b = !b, b && a % 2 == 0 && a--, rdm_curated_author_widget_get_content(a, b))
  311.     }), jQuery("div.author-list-controls span.left-arrow").click(function() {
  312.       var c = a - 1;
  313.       b && (c -= 1), 0 >= c || (a = c, rdm_curated_author_widget_get_content(a, b))
  314.     }), jQuery("div.author-list-controls span.right-arrow").click(function() {
  315.       var c = a + 1;
  316.       b && (c += 1), c > rdm_curated_author_widget_number_of_pages || (a = c, rdm_curated_author_widget_get_content(a, b))
  317.     })
  318.   }), jQuery(document).ready(function() {
  319.     Modernizr.mq("only screen and (min-width: 768px) and (max-width: 1007px)")
  320.   }), jQuery(window).resize(function() {
  321.     Modernizr.mq("only screen and (min-width: 768px) and (max-width: 1007px)")
  322.   }),
  323.   function(a, b, c) {
  324.     "use strict";
  325.     var d = c.body || c.documentElement,
  326.       d = d.style;
  327.     if ("" == d.webkitFlexWrap || "" == d.msFlexWrap || "" == d.flexWrap) return !0;
  328.     var e = a(".rdm-featured-stories .secondary-featured-stories-wrapper"),
  329.       f = e.find(".rdm-featured-stories .featured-stories-title"),
  330.       g = function() {
  331.         f.css("height", "auto");
  332.         var b = Math.floor(e.width() / f.width());
  333.         if (null == b || 2 > b) return !0;
  334.         for (var c = 0, d = f.length; d > c; c += b) {
  335.           var g = 0,
  336.             h = f.slice(c, c + b);
  337.           h.each(function() {
  338.             var b = parseInt(a(this).outerHeight());
  339.             b > g && (g = b)
  340.           }), h.css("height", g)
  341.         }
  342.       };
  343.     g(), a(b).on("resize", g), e.find("img").on("load", g)
  344.   }(jQuery, window, document), jQuery(document).ready(function(a) {
  345.     function b(b, c, d) {
  346.       if (c != d) {
  347.         var e = parseInt("previous" == b ? c - 1 : c + 1);
  348.         a(".most_popular_current_page").html(e), a(".section-" + e).show(), a(".section-" + c).hide()
  349.       }
  350.     }
  351.     a(".most_popular_next_section").click(function(c) {
  352.       c.preventDefault();
  353.       var d = parseInt(a(".most_popular_current_page").html()),
  354.         e = parseInt(a(".most_popular_total_page").html());
  355.       b("next", d, e), a(".most_popular_previous_section").hasClass("most_popular_nav_disabled") && a(".most_popular_previous_section").removeClass("most_popular_nav_disabled"), d + 1 == e && a(".most_popular_next_section").addClass("most_popular_nav_disabled")
  356.     }), a(".most_popular_previous_section").click(function(c) {
  357.       c.preventDefault(); {
  358.         var d = parseInt(a(".most_popular_current_page").html());
  359.         parseInt(a(".most_popular_total_page").html())
  360.       }
  361.       b("previous", d, 1), a(".most_popular_next_section").hasClass("most_popular_nav_disabled") && a(".most_popular_next_section").removeClass("most_popular_nav_disabled"), d - 1 == 1 && a(".most_popular_previous_section").addClass("most_popular_nav_disabled")
  362.     })
  363.   }), jQuery(document).ready(function(a) {
  364.     a(".flex-grid .box.recipe_tile article h5.post_excerpt p").length > 0 && a(".flex-grid .box.recipe_tile article h5.post_excerpt p").dotdotdot()
  365.   }), jQuery(document).ready(function() {
  366.     jQuery(window).width() < 1008 && (jQuery(".rdm_recipes_plus_single #post-excerpt-toggle").text("More"), jQuery(".rdm_recipes_plus_single #post-excerpt-toggle").addClass("show"), jQuery(".rdm_recipes_plus_single h2#post-excerpt").hide()), jQuery("#post-excerpt-toggle").on("click", function(a) {
  367.       a.preventDefault(), jQuery("h2#post-excerpt").is(":visible") ? (jQuery("#post-excerpt-toggle").addClass("show"), jQuery("h2#post-excerpt").hide(), ("More" == jQuery(this).html() || "Less" == jQuery(this).html()) && jQuery(this).html("More")) : (jQuery("#post-excerpt-toggle").removeClass("show"), jQuery("h2#post-excerpt").show(), ("More" == jQuery(this).html() || "Less" == jQuery(this).html()) && jQuery(this).html("Less"))
  368.     })
  369.   }), jQuery(document).ready(function(a) {
  370.     a.browser.msie && parseInt(a.browser.version) <= 8 && a(".flex-grid .box.recipe_tile article h4.postTitle").length > 0 && a(".flex-grid .box.recipe_tile article h4.postTitle").dotdotdot()
  371.   }), jQuery(document).ready(function(a) {
  372.     a(".printButton").click(function() {
  373.       window.print()
  374.     })
  375.   }),
  376.   function(a) {
  377.     "use strict";
  378.  
  379.     function b(b, c) {
  380.       var d = this;
  381.       d.defaults = {
  382.         allowSwipe: !1,
  383.         arrowNext: ".next-arrow",
  384.         arrowPrevious: ".previous-arrow",
  385.         slidesContainer: "li",
  386.         slidesToSlideBy: "visible",
  387.         thumbnailsContainer: "ul"
  388.       }, d.initials = {
  389.         activeSlide: 0,
  390.         leftPosition: 0,
  391.         leftPositionMax: 0,
  392.         slidesMargin: 0,
  393.         slidesMarginRight: 0,
  394.         slidesTotalWidth: 0,
  395.         slidesWidth: 0,
  396.         slidesVisible: 0,
  397.         slidesVisibleWidth: 0,
  398.         thumbnailsWidth: 0,
  399.         $activeSlide: null,
  400.         $arrowNext: null,
  401.         $arrowPrevious: null,
  402.         $slidesContainer: null,
  403.         $thumbnailsContainer: null
  404.       }, a.extend(d, d.initials), d.$thumbnails = a(b), d.options = a.extend({}, d.defaults, c), d.moveSlides = a.proxy(d.moveSlides, d), d.getLeftPosition = a.proxy(d.getLeftPosition, d), d.setDimensions = a.proxy(d.setDimensions, d), d.setSlidesVisible = a.proxy(d.setSlidesVisible, d), d.init()
  405.     }
  406.     a.fn.RDMGalleryThumbnails = function(a) {
  407.       var c = this;
  408.       return c.each(function() {
  409.         new b(c, a)
  410.       })
  411.     }, b.prototype.init = function() {
  412.       var b = this;
  413.       b.$thumbnailsContainer = b.$thumbnails.find(b.options.thumbnailsContainer), b.$slidesContainer = b.$thumbnails.find(b.options.slidesContainer), b.slideCount = b.$slidesContainer.length, b.$activeSlide = b.$slidesContainer.siblings(".active"), b.activeSlide = b.$slidesContainer.index(b.$activeSlide), b.setDimensions(), b.setSlidesVisible(), b.$previousArrow = b.$thumbnails.find(b.options.arrowPrevious), b.$previousArrow.on("click", {
  414.         direction: "previous"
  415.       }, b.moveSlides), b.$nextArrow = b.$thumbnails.find(b.options.arrowNext), b.$nextArrow.on("click", {
  416.         direction: "next"
  417.       }, b.moveSlides), a(window).on("resize", function() {
  418.         b.setDimensions(), b.setSlidesVisible(), b.options.slidesToSlideBy = b.slidesVisible
  419.       }), b.$slidesContainer.each(function(c, d) {
  420.         var e = a(d).find("a");
  421.         e.on("click", b.changeSlide)
  422.       }), b.slidesTotalWidth <= b.slidesVisibleWidth && (a(".gallery-slide-thumbnails-next").addClass("disabled"), a(".gallery-slide-thumbnails-previous").addClass("disabled"))
  423.     }, b.prototype.changeSlide = function(b) {
  424.       var c = a(b.currentTarget);
  425.       c.is("a") && b.preventDefault(), a(c).trigger("RDMGalleryChangeSlide")
  426.     }, b.prototype.setDimensions = function() {
  427.       var a = this;
  428.       a.thumbnailsWidth = a.$thumbnailsContainer.parent().width(), a.thumbnailsHeight = a.$thumbnailsContainer.parent().height(), a.slidesWidth = a.$slidesContainer.width(), a.slidesMargin = a.$slidesContainer.outerWidth(!0) - a.slidesWidth, a.slidesMarginRight = a.$slidesContainer.css("marginRight").replace("px", ""), a.slidesTotalWidth = a.slideCount * a.$slidesContainer.outerWidth(!0)
  429.     }, b.prototype.setSlidesVisible = function() {
  430.       var a = this;
  431.       a.slidesVisible = Math.floor((a.thumbnailsWidth + parseFloat(a.slidesMarginRight)) / a.$slidesContainer.outerWidth(!0)), a.slidesVisibleWidth = a.slidesVisible * a.slidesWidth + a.slidesVisible * a.slidesMargin, a.leftPositionMax = parseFloat(a.slidesTotalWidth) - parseFloat(a.slidesVisibleWidth), "visible" == a.options.slidesToSlideBy && (a.options.slidesToSlideBy = a.slidesVisible)
  432.     }, b.prototype.moveSlides = function(b) {
  433.       var c = this,
  434.         d = 0,
  435.         e = a(b.target);
  436.       switch (e.is("a") && b.preventDefault(), b.data.direction) {
  437.         case "previous":
  438.           d = c.getLeftPosition("previous");
  439.           break;
  440.         case "next":
  441.           d = c.getLeftPosition("next");
  442.           break;
  443.         default:
  444.           return !1
  445.       }
  446.       c.$thumbnailsContainer.css("left", "-" + d + "px")
  447.     }, b.prototype.getLeftPosition = function(b) {
  448.       var c = this,
  449.         d = 0,
  450.         e = 0;
  451.       return d = c.$thumbnailsContainer.css("left"), d = d.replace("px", "").replace("-", ""), parseFloat(d) || (d = 0), e = "previous" == b ? parseFloat(d) - parseFloat(c.slidesVisibleWidth) : parseFloat(d) + parseFloat(c.slidesVisibleWidth), 0 >= e ? (a(".gallery-slide-thumbnails-previous").addClass("disabled"), e = 0) : a(".gallery-slide-thumbnails-previous").removeClass("disabled"), e >= c.leftPositionMax ? (a(".gallery-slide-thumbnails-next").addClass("disabled"), e = c.leftPositionMax) : a(".gallery-slide-thumbnails-next").removeClass("disabled"), e
  452.     }
  453.   }(jQuery),
  454.   function() {
  455.     var a = 0;
  456.     checkDisableScrolling(), jQuery(".gallery-slide-thumbnails-container").RDMGalleryThumbnails({
  457.       arrowPrevious: ".gallery-slide-thumbnails-previous a",
  458.       arrowNext: ".gallery-slide-thumbnails-next a"
  459.     }), jQuery(".gallery-slide-thumbnails-container .gallery-slide-thumbnails ul li").each(function() {
  460.       a += jQuery(this).outerWidth(!0)
  461.     }), jQuery(".gallery-slide-thumbnails-container .gallery-slide-thumbnails ul").css("width", a + "px"), jQuery("#toggleGallerySlideCaption").on("click", function(a) {
  462.       a.preventDefault(), jQuery(".gallery-slide-caption-container").is(":visible") ? (jQuery(".gallery-slide-caption-container").slideUp(), jQuery(this).html("Show"), jQuery(this).removeClass("clicked")) : (jQuery(".gallery-slide-caption-container").slideDown(), jQuery(this).html("Hide"), jQuery(this).addClass("clicked"))
  463.     })
  464.   }(jQuery), jQuery(document).ready(function(a) {
  465.     jQuery(".gallery-social-wrapper").css("display", "block"), setShareOverlayPosition(), setCaptionPosition(), a("a.gallery-icon.gallery-slide-share, a.gallery-button.gallery-slides-share-close").click(function(a) {
  466.       toggleShareOverlay(), a.preventDefault()
  467.     }), jQuery(window).resize(function() {
  468.       setShareOverlayPosition(), setCaptionPosition()
  469.     })
  470.   }), jQuery(document).ready(function(a) {
  471.     a.browser.msie && parseInt(a.browser.version) <= 8 && (a(".recipe_additional_fields .recipe_additional_fields_separator:last-child").css({
  472.       border: "none",
  473.       padding: "0",
  474.       margin: "0"
  475.     }), a(".recipe_additional_fields .recipe_additional_fields_separator div:last-child").css({
  476.       border: "none",
  477.       padding: "0",
  478.       margin: "0"
  479.     }))
  480.   });
  481. var recipesFilterToolAjaxCall = !1;
  482. jQuery(document).ready(function(a) {
  483.   a("#open_filter_tool_button, .filter_tool_button").click(function() {
  484.     var b = "";
  485.     b = a(this).siblings(".filter_tool_container").length > 0 ? a(this).siblings(".filter_tool_container") : a(this).parents(".filter_tool_container"), b.is(":visible") ? (a("#main .content").height("auto"), b.hide(), a("#open_filter_tool_button").removeClass("selected")) : (rdm_recipes_adjust_content_height(), b.show(), a("#open_filter_tool_button").addClass("selected"))
  486.   }), a(".filter_option").on("click", function() {
  487.     a(this).parent().hasClass("single") && a(this).siblings().each(function() {
  488.       a(this).removeClass("selected"), a("#" + a(this).attr("id") + "_selected").remove()
  489.     }), a(this).hasClass("selected") ? (a(this).removeClass("selected"), a("#" + a(this).attr("id") + "_selected").remove(), a(this).siblings(".filter_option").hasClass("selected") || a(this).closest(".column_padding").find("p.filter_section_title").removeClass("selected")) : (a(this).addClass("selected"), rdm_recipes_add_filter(a(this).attr("id"), "", a(this).find("span.filter_label").text(), a(this).attr("data-search")), a(this).closest(".column_padding").find("p.filter_section_title").hasClass("selected") || a(this).closest(".column_padding").find("p.filter_section_title").addClass("selected")), rdm_recipes_auto_update_search()
  490.   }), a("#filter_ingredient_input").keypress(function(b) {
  491.     13 == b.keyCode && (a("#filter_add_ingredients").trigger("click"), b.preventDefault())
  492.   }), a(".selected_filter_container").on("click", ".selected_filter", function() {
  493.     var b = a(this).attr("id");
  494.     if ("undefined" != typeof b) {
  495.       var c = b.split("_selected"),
  496.         d = c[0];
  497.       if ("undefined" != typeof d) {
  498.         if (a(".filter_section #" + d).length > 0) a("#" + d).removeClass("selected"), a("#" + d).siblings(".filter_option").hasClass("selected") || a("#" + d).closest(".column_padding").find("p.filter_section_title").removeClass("selected");
  499.         else {
  500.           var e = d.split("_");
  501.           if ("undefined" != typeof e[0] && (e.length > 1 || "issuedate" == e[0])) {
  502.             var f = e[0],
  503.               g = a("#" + b).siblings("." + f).length;
  504.             0 == g && a("div#" + f + "_filter_section p.filter_section_title").removeClass("selected")
  505.           }
  506.         }
  507.         a(this).remove(), rdm_recipes_auto_update_search()
  508.       }
  509.     }
  510.   }), a("p.filter_section_title").on("click", function() {
  511.     if ("undefined" != Modernizr.mq && Modernizr.mq("only screen and (max-width: 767px)")) {
  512.       var b = a(this).siblings("div.filter_option_container");
  513.       rdm_recipes_adjust_content_height(), a(this).hasClass("opened") ? (a(this).removeClass("opened"), b.removeClass("show_mobile")) : (a(this).addClass("opened"), b.addClass("show_mobile"))
  514.     }
  515.   }), a("#filter_ingredient_input").focus(function() {
  516.     if ("i.e. tofu, quinoa, kale" == a(this).val()) {
  517.       a(this).val("");
  518.       var b = "#000";
  519.       "rgb(102, 102, 102)" != a(this).css("color") && "rgb(0, 0, 0)" != a(this).css("color") && (b = a(this).css("color")), a(this).css({
  520.         "font-size": "16px",
  521.         "font-weight": "normal",
  522.         color: b,
  523.         "font-style": "normal"
  524.       })
  525.     }
  526.   }).blur(function() {
  527.     if ("" == a(this).val()) {
  528.       a(this).val("i.e. tofu, quinoa, kale");
  529.       var b = "";
  530.       "rgb(102, 102, 102)" != a(this).css("color") && "rgb(0, 0, 0)" != a(this).css("color") && (b = a(this).css("color")), a(this).removeAttr("style"), a(this).css("color", b)
  531.     }
  532.   }), a("#filter_add_ingredients").on("click", function(b) {
  533.     a("#filter_ingredient_input").css("color", "#000000"), a("#recipe_filter_tool_ingredient_error").html("");
  534.     var c = [",", "\\+", "&"],
  535.       d = a("#filter_ingredient_input").val().toLowerCase();
  536.     if ("i.e. tofu, quinoa, kale" == d && (d = ""), "" != a.trim(d)) {
  537.       var e = d.split(new RegExp(c.join("|"))),
  538.         f = "";
  539.       for (i = 0; i < e.length; i++) {
  540.         var g = a.trim(e[i]);
  541.         if ("" != g) {
  542.           var h = rdm_recipes_add_filter("ingredient_" + g.replace(" ", "_"), "ingredient", g, "ingredients:" + g);
  543.           h ? rdm_recipes_auto_update_search() : f += "This ingredient has already been selected.<br />", !a(this).closest(".column_padding").find("p.filter_section_title").hasClass("selected") && h && a(this).closest(".column_padding").find("p.filter_section_title").addClass("selected")
  544.         }
  545.       }
  546.       "" != f && a("#recipe_filter_tool_ingredient_error").html(f), a("#filter_ingredient_input").val("i.e. tofu, quinoa, kale"), a("#filter_ingredient_input").removeAttr("style")
  547.     } else a("#filter_ingredient_input").css("color", "#EB008B"), a("#recipe_filter_tool_ingredient_error").text("Please type in an ingredient to add a recipe filter.");
  548.     b.preventDefault()
  549.   }), a("#filter_add_issuedate").on("click", function(b) {
  550.     a("#filter_issuedate_month").css("color", "#000000"), a("#filter_issuedate_year").css("color", "#000000"), a("#recipe_filter_tool_issuedate_error").html("");
  551.     var c = a("#filter_issuedate_month").val(),
  552.       d = a("#filter_issuedate_year").val(),
  553.       e = "",
  554.       f = "";
  555.     if ("" == c && "" == d ? (f = "Please select month and year to add a recipe filter", a("#filter_issuedate_month").css("color", "#EB008B"), a("#filter_issuedate_year").css("color", "#EB008B")) : "" == c ? (f = "Please select month to add a recipe filter", a("#filter_issuedate_month").css("color", "#EB008B")) : "" == d ? (f = "Please select year to add a recipe filter", a("#filter_issuedate_year").css("color", "#EB008B")) : (e = c + " " + d, recipe_filter_tool.issues.indexOf(e) < 0 && (f = "Please select another issue date, the one you chose does not exist")), "" != f) a("#recipe_filter_tool_issuedate_error").html(f);
  556.     else {
  557.       var g = rdm_recipes_add_filter("issuedate", "issuedate", e, "issue_date:" + e);
  558.       g || a("#recipe_filter_tool_issuedate_error").text("There is already an issue date in the selected filters."), !a(this).closest(".column_padding").find("p.filter_section_title").hasClass("selected") && g && (a(this).closest(".column_padding").find("p.filter_section_title").addClass("selected"), rdm_recipes_auto_update_search())
  559.     }
  560.     b.preventDefault()
  561.   })
  562. }), jQuery(document).ready(function(a) {
  563.   a(".recipe_list_toggle").click(function(b) {
  564.     a(this).siblings().removeClass("selected"), a(this).addClass("selected");
  565.     var c = "#recipe_" + a(this).text().toLowerCase() + "_container";
  566.     a(".recipe_toggle_display_container").hide(), a(c).show(), b.preventDefault()
  567.   })
  568. });
  569. var searchPaginationPage = 2;
  570. jQuery(document).ready(function(a) {
  571.   a("#recipe_search_load_more").click(function() {
  572.     if (!a(this).hasClass("loading")) {
  573.       var b = jQuery("#recipeFilterToolForm").serializeArray();
  574.       b.push({
  575.         name: "page",
  576.         value: searchPaginationPage
  577.       }), a(this).addClass("loading"), that = a(this), a.ajax({
  578.         url: loop.parentThemeUrl + "/ComponentControllers/RecipeSearchResultsComponent/ajax.getSearchPost.php",
  579.         data: b,
  580.         type: "POST",
  581.         success: function(b) {
  582.           (b.indexOf("--hidebutton") >= 0 || "" == b) && (a("#recipe_search_load_more").hide(), b = b.replace("--hidebutton", "")), a("#recipe_search_flex_grid").append(b), that.removeClass("loading"), searchPaginationPage++
  583.         },
  584.         complete: function() {
  585.           a("#recipe_search_flex_grid .box article h4.postTitle").dotdotdot(), a("#recipe_search_flex_grid .box article h5.post_excerpt p").dotdotdot()
  586.         }
  587.       })
  588.     }
  589.   })
  590. }), jQuery(document).ready(function(a) {
  591.   a("#recipe_suggestion_tool_meal_type").change(function() {
  592.     rdmRecipeSuggestionToolAssignMealType()
  593.   }), a("form#recipe_suggestion_tool").submit(function() {
  594.     0 != a("#recipe_suggestion_tool_ingredient_id").length && 0 != a("#recipe_suggestion_tool_meal_type_id").length && ("" != a("#recipe_suggestion_tool_ingredient").val() && a("#recipe_suggestion_tool_ingredient").val() != a("#recipe_suggestion_tool_ingredient").attr("placeholder") ? rdmRecipeSuggestionToolAssignIngredient() : rdmRecipeSuggestionToolInvalidateIngredient())
  595.   }), a("#recipe_suggestion_tool_see_all").click(function(b) {
  596.     b.preventDefault(), b.stopPropagation(), rdmRecipeSuggestionToolInvalidateIngredient(), rdmRecipeSuggestionToolInvalidateMealType(), a("form#recipe_suggestion_tool").submit()
  597.   }), a(".with-this-ingredient input").change(function() {
  598.     "" == a(this).val() && a(this).parent().hasClass("focus_input") && a(this).parent().removeClass("focus_input"), "" == a(this).val() || a(this).parent().hasClass("focus_input") || a(this).parent().addClass("focus_input")
  599.   }), a("#magnifying_glass").click(function() {
  600.     var b = a("input#recipe_suggestion_tool_ingredient");
  601.     b.val(""), a(".with-this-ingredient input").parent().removeClass("focus_input")
  602.   }), rdmRecipeMealTypeDropDownMenu(a)
  603. }), jQuery(document).ready(function(a) {
  604.   var b = a(".menu-resources-menu-container, .menu-ressources-menu-container");
  605.   a(".resource-menu-toggle").click(function() {
  606.     b.slideToggle(400, function() {
  607.       b.is(":visible") ? a(".resource-menu-toggle").css("background-position", "-765px -816px") : a(".resource-menu-toggle").css("background-position", "-514px -816px")
  608.     })
  609.   })
  610. }), jQuery(document).ready(function(a) {
  611.   a(".comment-button").click(function() {
  612.     return rdm_foundation_comment_button_click(), !1
  613.   })
  614. });
  615. var dfd = jQuery.Deferred(),
  616.   oldTotalBoxes = [0];
  617. jQuery(document).ready(function(a) {
  618.   var b = 1,
  619.     c = 1,
  620.     d = loopFooter.calledAds;
  621.   a(".flex-grid .box article .text header .excerpt").each(function() {
  622.     a(this).children("p").each(function(b) {
  623.       0 != b && a(this).remove()
  624.     })
  625.   }), a(".flex-grid .box article .text header h1").dotdotdot(), a(".flex-grid div.box:not(.featured) article .text header .excerpt p").dotdotdot(), a(".flex-grid div.box:not(.featured) article .text header .dek p").dotdotdot(), a(".river .type-post .text .excerpt").css("visibility", "visible"), a("body").hasClass("category") && a("article.rdm-brightcove").length > 0 || a(".content-box").length > 0 && a(".ad-box").length > 0 && (a("body").hasClass("single-post") || (window.rdm_firstLoad = !0, a(window).resize(rdm_foundation_swap_boxes(!0)))), "undefined" != typeof googletag && googletag.pubads().addEventListener("slotRenderEnded", function(a) {
  626.     a.size[1] > 298 && rdm_foundation_swap_boxes(!0)
  627.   }), a("#recipe_landing_load_more").on("click", function() {
  628.     oldTotalBoxes.push(a(".swap-box").length), a(this).hasClass("loading") || (a(this).addClass("loading"), that = a(this), loop.queryArgs.paged = b, a.ajax({
  629.       url: loop.parentThemeUrl + "/loop.php",
  630.       data: {
  631.         ajaxLoad: "true",
  632.         queryArgs: loop.queryArgs,
  633.         view: "recipe-landing",
  634.         callId: c,
  635.         calledAds: d
  636.       },
  637.       type: "POST",
  638.       success: function(a) {
  639.         a = JSON.parse(a), d = a.calledAds, (a.output.indexOf("--hidebutton") >= 0 || "" == a.output) && (that.remove(), a.output = a.output.replace("--hidebutton", "")), that.siblings(".flex-grid").children(".content-box").last().after(a.output), that.removeClass("loading"), "undefined" != typeof googletag && googletag.pubads().addEventListener("slotRenderEnded", function() {
  640.           rdm_foundation_swap_boxes(!0)
  641.         })
  642.       },
  643.       complete: function() {
  644.         that.siblings(".flex-grid").children(".box article h4.postTitle").dotdotdot(), that.siblings(".flex-grid").children(".box article h5.post_excerpt p").dotdotdot()
  645.       }
  646.     }), b++, c++)
  647.   })
  648. }), jQuery(document).ready(function(a) {
  649.   a(".selectedPlaceholder").each(function() {
  650.     a(this).text(a(this).siblings(".toggleButton.selected").text())
  651.   }), a(".toggleButton").click(function(b) {
  652.     a(this).siblings().removeClass("selected"), a(this).addClass("selected"), a(this).siblings(".selectedPlaceholder").text(a(this).text()), a(this).parent().siblings(".togglePlusSign").hasClass("open") && (a(this).parent().attr("style", ""), a(this).parent().siblings(".togglePlusSign").text("+"), a(this).parent().siblings(".togglePlusSign").removeClass("open"));
  653.     var c = ".toggledDivContainer #" + a(this).text().toLowerCase().replace(new RegExp(" ", "g"), "_") + "_container";
  654.     a(c).siblings().hide(), a(c).show({
  655.       complete: function() {
  656.         a(".toggledDivContainer h5.post_excerpt p").dotdotdot(), a(".toggledDivContainer h4.postTitle").dotdotdot()
  657.       },
  658.       duration: 0
  659.     }), b.preventDefault()
  660.   }), a(".togglePlusSign").click(function() {
  661.     if (a(this).hasClass("open")) a(this).siblings(".toggleButtonContainer").attr("style", ""), a(this).text("+"), a(this).removeClass("open");
  662.     else {
  663.       var b = a(this).siblings(".toggleButtonContainer").css("height", "auto").height();
  664.       a(this).siblings(".toggleButtonContainer").animate({
  665.         height: b
  666.       }, 100), a(this).text("-"), a(this).addClass("open")
  667.     }
  668.   })
  669. }), jQuery(document).ready(function(a) {
  670.   a(".top-scroll, .back_to_top_button").click(function(b) {
  671.     a("html, body").animate({
  672.       scrollTop: 0
  673.     }, "slow"), b.preventDefault()
  674.   }), a(window).scroll(function() {
  675.     a(this).scrollTop() > 200 && parseInt(a(".back_to_top_button").css("left")) < 0 && a(".back_to_top_button").animate({
  676.       left: "0px"
  677.     }, 500), a(this).scrollTop() <= 200 && parseInt(a(".back_to_top_button").css("left")) >= 0 && a(".back_to_top_button").animate({
  678.       left: "-250px"
  679.     }, 500)
  680.   })
  681. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement