");
if ($this.html().indexOf(":") > -1) {
var spl = $this.html().split(/:(.+)/);
var $td1 = $("");
$td1.html(spl[0]);
var $td2 = $(" |
");
$td2.html(spl[1]);
$tr.append($td1).append($td2);
} else {
var $td1 = $(" |
");
$td1.html($this.html());
var $td2 = $(" |
");
$tr.append($td1).append($td2);
}
$table.append($tr);
});
$(this).replaceWith($table);
});
});
tabsStr += "";
var tabsFinal = "";
tabsFinal += $html_parsed.html() + " ";
$ddsEl.html(tabsStr+tabsFinal).wrap("");
$("#ddsInclude").show();
}
function bindPageScripts() { // allows reload of product-page javascripts after an ajax get
$('.cbox').click(function(){
if ($(this).hasClass('active')) {
return;
}
$(this).siblings('.cbox').removeClass('active');
$(this).addClass('active');
var relStr = $(this).attr('data-rel');
_url = "index.jsp?path=product&process=&&previous=3370359&part="+relStr;
loadVariant(_url);
});
// KENDALL CUSTOM: parse DDS content into tabs
if ($('#dds.dds-content').length > 0) {
parseDDSContent($('#dds.dds-content'));
}
// product page functions to list again, to bind to ajax event
if ($('#tabs > A').length){
$('#tabs > A:first-child').addClass('active');
var id_curr = $('#tabs A.active').attr('data-rel');
$('#'+ id_curr).css('display', 'block');
setTabHeight(id_curr);
}
$('#tabs > A').click(function(){
if ($(this).hasClass('active')) {return false;}
$('#tabs A.active').removeClass('active');
$(this).addClass('active');
var id_cur = $(this).attr('data-rel');
$('.detail').hide();
$('#'+ id_cur).show();
setTabHeight(id_cur);
return false;
});
// product page multiple images
if ($('a#big-image').length > 0) {
function zoomAndClick(w){
if (w == 1) {
$('a#big-image:not(.nozoom,.has3d)').zoom({
url: $('a#big-image img').attr('href'),
magnify: 1.5
});
$('a#big-image:not(.nozoom,.has3d)').click(function(){
$(this).colorbox({
scalePhotos: true,
photo: true,
maxWidth: (!$('.hamburger').is(':hidden')) ? "325px" : "900px"
});
});
} else {
$('a#big-image:not(.has3d)').hover(function(){
$(this).trigger(zoom.destroy);
});
$('.zoomImg').remove();
$.colorbox.remove();
}
};
$('#small-images').delegate('img','click', function(){
$('#small-images').find("li").removeClass("active");
$(this).closest("li").addClass("active");
// Kendall CUSTOM
if ($(this).closest("li").hasClass("three-d")) {
$('a#big-image').addClass("has3d");
$('a#big-image img').hide().attr('src',$(this).attr('data-rel'));
$('a#big-image iframe#threeDimage').show();
$('.zoom-note').css('visibility','hidden');
zoomAndClick(0);
} else {
$('a#big-image iframe#threeDimage').hide();
$('a#big-image img').show().attr('src',$(this).attr('data-rel'));
$('a#big-image').removeClass("has3d").attr('href',$(this).attr('data-rel'));
$('.zoom-note').css('visibility','visible');
zoomAndClick(1);
}
});
zoomAndClick(1);
}
/* prod page carousels */
if ($('.pdp_prods_list ul').length > 0 && typeof $.fn.slick !== 'undefined') {
if ($.isFunction($.fn.equalHeight)) {
$('.pdp_prods_list ul').on('init', function(event, slick){
$('.pdp_prods_list ul li p').equalHeight();
});
}
$('.pdp_prods_list ul').slick({
slidesToShow: 4,
slidesToScroll: 3,
swipeToSlide: false,
speed: 500,
slide: 'li',
nextArrow: '',
prevArrow: '',
responsive: [{
breakpoint: 950,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
}]
});
}
// KENDALL custom
}
bindPageScripts(); // inits javascripts on page load
});
|