Wolf People - Ruins Out Now - Buy, download or stream!
X Icon X Patreon Icon
"]); } if (window.$) { var offer = null; var offerUrlOverridden = false; $(document).ready(function () { $('.retailer-link').each(function (e, retailer) { var $target = $(this); var event = $target.data('event'); var retailerId = $(retailer).data('id'); $target.attr("href", event.value); //check to see if an offer is associated with a retailer option for this smartURL //if it is, swap out the default URL with the destination provided by the user //if an offer URL has already been overridden by a different retailer, skip this process if(!offerUrlOverridden && offer) { $(offer.associatedRetailerIds).each(function(f, associatedRetailerId){ if(associatedRetailerId === retailerId) { //this retailer is associated with an offer URL override $('#offer__url').attr('href', $target.attr('href')); offerUrlOverridden = true; //only do this for the first match return false; } }); } }); $('.retailer-link').on('click', function (e) { e.preventDefault(); e.stopImmediatePropagation(); var $target = $(this); var retailerId = $target.data('id'); var internalName = $target.data('internal-name'); var destUrl = $target.data('url'); var imageUrl = { url: window.location.origin + '/_event', data: { event: $target.data('event'), renderInfo: window.renderInfo } }; var prefCheck = document.getElementById('pref-check'); if (prefCheck && prefCheck.checked) { smartURL.setCookie('retailer_id', retailerId); } smartURL.retailerSelected(internalName, destUrl, imageUrl); }); $('#offer__url').on('click', function(e) { e.preventDefault(); e.stopImmediatePropagation(); var $target = $(this); var offerId = $target.data('id'); var destUrl = $target.attr('href'); var imageUrl = { url: window.location.origin + '/_event', data: { event: { renderId: window.renderInfo.renderId, smartUrlId: window.renderInfo.smartUrlId, offerId: offerId, timestamp: 0, type: 'OFFER_CLICK', value: destUrl } } }; smartURL.offerSelected(offerId, destUrl, imageUrl); }) }); } } }());