var clickedCashback;$(function(){var a=new ZeroClipboard($(".copy-code"));clickedCashback=$("#store-banner h3.store-cashback").length>0?$("#store-banner h3.store-cashback").html():"";$(".store-reveal").click(function(){if(!isLoggedIn){var g=$(this).find(".store-affiliate-title h2").html();var d=$(this).find(".store-affiliate-expiry p").html();var f=$(this).find(".store-affiliate").attr("data-code");var e=$(this).attr("data-link");var b=$("#modalRevealCode");if(f.length>0){b.find("div.store-voucher, p.store-voucher").show();b.find(".modal-body p.paste").show()}else{b.find("div.store-voucher, p.store-voucher").hide();b.find(".modal-body p.paste").hide()}var c="";var h=$(this).parent().parent().find("h3.store-amount.hidden-xs");if(h.length>0){clickedCashback=h.data("true-value")+"% Cashback"}if(clickedCashback!==""){c="Join us now & get "+clickedCashback+" FREE.
Try it, it's on us! =)"}b.find(".modal-header h3").html(g);b.find(".modal-body h4").html(d);b.find(".modal-body h5").html(c);b.find(".modal-body input").val(f);b.find(".modal-body h2.invi").text(f);b.find("a.continue-link").attr("href",e);b.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(c){c.preventDefault();var b=$($(this).attr("href"));$("html, body").animate({scrollTop:b.offset().top-30},"fast")});$(".merch-reveal").click(function(){var f=$(this).parent().parent().parent();if(!isLoggedIn){var h=f.find(".h-affiliate-title").html();var g=f.find("p.merch-affiliate-description").html();var c=f.find("p.merch-affiliate-expiry").html();var e=f.attr("data-code");var d=$(this).attr("data-link");var b=$("#modalRevealCode");if(e.length>0){b.find("div.store-voucher, p.store-voucher").show();b.find(".modal-body p.paste").show()}else{b.find("div.store-voucher, p.store-voucher").hide();b.find(".modal-body p.paste").hide()}b.find(".modal-header h3").html(h);b.find(".modal-body h4").html(c);b.find(".modal-body h5").html(g);b.find(".modal-body input").val(e);b.find(".modal-body .copy-code").attr("data-clipboard-text",e);b.find(".modal-body h2.invi").text(e);b.find("a.continue-link").attr("href",d);b.find("button.copy-btn").html("Copy");$("#modalRevealCode").modal("show")}});$(".read-more.hidden-xs").click(function(){$(".h-desc").toggleClass("faded-1").toggleClass("faded-2");$(this).find("span").toggleClass("hide")});$(".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")});$(".pastDeals a").click(function(){$(".current-deals .merch-affiliate.expired").removeClass("hide");$(".pastDeals").remove()})});