The perfect solution made just for you!
RUN TIME
Coupon Button Controller
Our Top Picks
There are no results for your search. Reset Filters
Displaying 1-5 of 5 results.
172899174173183487185095187783
Category List
");
//Convert and feed to the categoryListDynamic
$('#categoryListDynamic').append(catList);
});
//Add the logic to filter it out the category and based of the category, also filter out the productions.
var a = "", r = "&", i = "=";
$(".filtersWrappr select").change(function () {
$(".filtersWrappr select").each(function () {
var t = $(this).attr("name"),
s = $(this).val(),
l = t + i + s + r;
a += l
}), url = location.protocol + "//" + location.host + location.pathname, window.location = url + "?" + a;
});
if ($("#yw1").length) {
rr = $("#yw1").html();
$("#yw1").css("display", "none");
pagerCon = rr.replace(/href="\//g, 'data-ajax="false" href="/');
$(".noajax").html(pagerCon);
}
//Inner Function
$(function () {
$(".showMoreCat").click(function () {
$(this).parent().parent().toggleClass("on");
});
$("#pairedOfferMobile").click(function () {
$(this).parent().parent().toggleClass("on");
});
$(".sorttrigger").click(function () {
$(this).parent().addClass("active");
$(document).mouseup(function (e){
$(".sorttrigger").parent().removeClass('active');
});
});
var e = "all";
if (window.location.hash) {
var s = window.location.hash,
r = new RegExp(/#\w+(-\d+)/g),
l = r.exec(s),
i = String(l);
e = i.replace("#", ".")
}
function scrollIf(e) {
if (e !== '.mix') {
$("html, body").animate({
scrollTop: $("#Container").offset().top
}, 0);
}
}
$('#Container').mixItUp({
load: {
sort: 'random',
filter: e
},
animation: {
enable: false
},
callbacks: {
onMixFail: function () {
scrollIf();
}, onMixEnd: function (state) {
scrollIf(state.activeFilter);
}
}
});
if(document.getElementsByClassName("saleItem")){
var fetItem = document.getElementsByClassName("saleItem");
}
var startafg = 0;
var year = getCookie("car_afg_year"), make = getCookie("car_afg_make"), model = getCookie("car_afg_model"), displayMake = make.replace(/\+/g, " "), displayModel = model.replace(/\+/g, " ").replace(/%26/g, "and");
if (year !== "" && make !== "" && model !== "") {
startafg = 1;
}
for (var i = fetItem.length - 1; i >= 0; i--) {
thisItem = fetItem[i];
idval=$(thisItem).attr("data-id");
for(theIndex = -1, u = 0; u < deals.length; u++){
if (deals[u].sku == idval) {
theIndex = u;
break
}
}
stockLevel = $(thisItem).find(".stockCount").text();
price = $(thisItem).attr("data-price");
msrp = $(thisItem).attr("data-msrp");
discount = Math.round((msrp - price) / msrp * 100);
$(thisItem).find(".discountOff").text(discount + "% OFF");
$(thisItem).attr("data-discount", discount);
pID = $(thisItem).attr("data-id");
pType = $(thisItem).attr("data-type");
bag = $(thisItem).find(".addtoBag");
code="";
buyUrl= $(thisItem).find(".addtoBag").attr("href");
if (pType == 9 || pType == 10) {
if (startafg == 1) {
var afgGet = '/item_' + pID + '_pla.html?afg%5Byear%5D=' + year + '&afg%5Bmake%5D=' + make + '&afg%5Bmodel%5D=' + model + '';
bag.attr("href", afgGet);
bag.html("See if it Fits »");
} else {
}
} else {
$(thisItem).find(".addtoBag").attr("href",buyUrl+"?redeem_coupon="+code);
}
stars = $(thisItem).find(".stars span");
for (var e = stars.length - 1; e >= 0; e--) {
thisStar = stars[e];
num = $(thisStar).attr("data-star");
score = $(thisStar).parent().attr("score");
var diff = num - score;
score >= num ? $(thisStar).addClass("fa-star") : diff > 0 && 1 > diff ? $(thisStar).addClass("fa-star-half-o") : score <= num && $(thisStar).addClass("fa-star-o")
}
}
if($(".ui-mobile-viewport")){
var mobey = $(".ui-mobile-viewport");
if (mobey.length) {
$(".yiiPager a").each(function () {
$(this).attr("data-ajax", "false");
});
}
$(".mix").hover(function () {
if (!mobey.length) {
$(this).addClass("on");
}
}, function () {
if (!mobey.length) {
$(this).removeClass("on");
}
});
}
if(document.getElementById("filters")){
k = document.getElementById("filters"),
w = document.body.getBoundingClientRect(),
p = k.getBoundingClientRect(),
q = p.top - w.top;
var r = k.clientHeight;
k.parentNode.style.height = r + 'px';
var u = k.clientWidth;
k.style.width = u + 'px';
}
var b = 0, u = 5;
$("#showDB").click(function () {
$("#SaleContainer").removeClass("pagey");
$(this).css("display", "none");
});
});
},
}
MAINTASK.init();
}