var clickedCashback;$(function(){new ZeroClipboard($(".copy-code"));clickedCashback=$("#store-banner .store-cashback").length>0?$("#store-banner .store-cashback").html():"",$(".store-reveal").click(function(){if(!isLoggedIn){var e=$(this).find(".store-affiliate-title p").html(),t=$(this).find(".store-affiliate-description").html(),a=$(this).find(".store-affiliate-expiry p").html(),i=$(this).find(".store-affiliate").attr("data-code"),o=$(this).attr("data-link"),d=$("#modalRevealCode");i.length>0?(d.find("div.store-voucher, p.store-voucher").show(),d.find(".modal-body p.paste").show()):(d.find("div.store-voucher, p.store-voucher").hide(),d.find(".modal-body p.paste").hide());var l=t,n=$(this).parent().parent().find(".store-amount.hidden-xs");n.length>0&&(clickedCashback=n.data("true-value")+"% Cashback"),""!==clickedCashback&&(l="Join us now & get "+clickedCashback+" FREE.
Try it, it's on us! =)"),d.find(".modal-header .modal-title").html(e),d.find(".modal-body .h-heading-2").html(a),d.find(".modal-body .h-heading-2b").html(l),d.find(".modal-body input").val(i),d.find(".modal-body .invi").text(i),d.find("a.continue-link").attr("href",o),d.find("button.copy-btn").html("Copy"),$("#modalRevealCode").modal("show")}}),$(".store-body").click(function(){$(this).parent().parent().find(".store-affiliate-box a").click()}),$("#modalRevealCode button.copy-btn").click(function(){$(this).addClass("disabled").html("✔ Copied")}),$(".termsexclusions a.btn-green").click(function(e){e.preventDefault();var t=$($(this).attr("href"));$("html, body").animate({scrollTop:t.offset().top-30},"fast")}),$(".merch-reveal").click(function(){var e=$(this).parent().parent().parent();if(!isLoggedIn){var t=e.find(".h-affiliate-title").html(),a=e.find("p.merch-affiliate-description").html(),i=e.find("p.merch-affiliate-expiry").html(),o=e.attr("data-code"),d=$(this).attr("data-link"),l=$("#modalRevealCode");o.length>0?(l.find("div.store-voucher, p.store-voucher").show(),l.find(".modal-body p.paste").show()):(l.find("div.store-voucher, p.store-voucher").hide(),l.find(".modal-body p.paste").hide()),l.find(".modal-header .modal-title").html(t),l.find(".modal-body .h-heading-2").html(i),l.find(".modal-body .h-heading-2b").html(a),l.find(".modal-body input").val(o),l.find(".modal-body .copy-code").attr("data-clipboard-text",o),l.find(".modal-body .invi").text(o),l.find("a.continue-link").attr("href",d),l.find("button.copy-btn").html("Copy"),$("#modalRevealCode").modal("show")}}),$(".read-more.hidden-xs").click(function(){$(".h-desc").toggleClass("faded-1").toggleClass("faded-cancel"),$(this).find("span").toggleClass("hide")}),$(".faded-2").click(function(){$(this).removeClass("faded-2").addClass("faded-cancel")}),$(".blox.colLeft .merchant-notes .ex").click(function(){$(this).toggleClass("ex-expanded").toggleClass("ex-collapsed"),$(this).parent().parent().find(".merchant-notes-content").toggleClass("hide")}),$(".blox.colRight .merchant-notes .row-heading").click(function(){$(this).find(".ex").toggleClass("ex-expanded").toggleClass("ex-collapsed"),$(this).parent().find(".merchant-notes-content").toggleClass("hide")}),$("#merchantHeader .headerDetails a.merch-modal-show").click(function(){$(".blox.colLeft .current-deals .merch-affiliate:first-child .get-cashback").trigger("click")}),$(".moreDeals").click(function(){var e=0;$(".merch-affiliate.hide:not(.expired)").each(function(){5>e&&$(this).removeClass("hide"),e++,0===$(".merch-affiliate.hide:not(.expired)").length&&($(".moreDeals").remove(),$(".pastDeals").removeClass("hide"))})}),$(".pastDeals a").click(function(){$(".current-deals .merch-affiliate.expired").removeClass("hide"),$(".pastDeals").remove()})});