function slider_init() {
function fancyReinit() {
$("[data-fancybox]").fancybox({
slideShow: false,
fullScreen: false,
onComplete: function() {
$('.fancybox-thumbs').scrollbar();
$('.scroll-bar').addClass('bxr-color');
},
thumbs : {
showOnStart: true,
},
});
};
function zoomReInit() {
$('.bxr-zoom-img').loupe({loupe:'bxr-loupe'});
};
$('#'+'bx_117848907_31005_slider_cont').on('afterChange', function(event, slick, currentSlide, nextSlide){
data = $('#bx_117848907_31005_slider_cont').find('.slick-active').data('slick-index');
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-track').children('.slick-slide')).removeClass("bxr-border-color").addClass("bxr-def-border");
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-track').children('.slick-slide[data-slick-index='+data+']')).removeClass("bxr-def-border").addClass("bxr-border-color");
});
var obbx_117848907_31005_slider_cont = $('#bx_117848907_31005_slider_cont').slick({
slidesToShow: 1,
slidesToScroll: 1,
speed: 300,
arrows: true,
prevArrow: ' ',
nextArrow: ' ',
fade: true,
dots: false,
infinite: true,
cssEase: 'linear',
asNavFor: '#bx_117848907_31005_slider_nav_cont',
slide: 'a'
});
$('#bx_117848907_31005_slider_nav_cont').on('afterChange', function(event, slick, currentSlide, nextSlide){
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-nav')).removeClass("bxr-border-color").addClass("bxr-def-border");
$('#bx_117848907_31005_slider_nav_cont'+' .slick-nav.slick-current').removeClass("bxr-def-border").addClass("bxr-border-color");
});
var obbx_117848907_31005_slider_nav_cont = $('#bx_117848907_31005_slider_nav_cont').slick({
slidesToShow: 4,
slidesToScroll: 1,
speed: 300,
arrows: true,
prevArrow: ' ',
nextArrow: ' ',
dots: false,
infinite: true,
centerMode: false,
cssEase: 'linear',
asNavFor: '#bx_117848907_31005_slider_cont',
focusOnSelect: false,
slide: 'div'
});
$('#bx_117848907_31005_slider_nav_cont'+' .slick-slide').on('click', function(e){
sCnt = $('#bx_117848907_31005_slider_nav_cont'+' .slick-nav:not(.slick-cloned)').length - 1;
c = $('#bx_117848907_31005_slider_nav_cont'+' .slick-nav:not(.slick-cloned)[data-item='+$(this).data('item')+'][data-slick-index='+$(this).data('slick-index')+']').index();
clone = $('#bx_117848907_31005_slider_nav_cont'+' .slick-nav.slick-cloned').length / 2;
index = (c>0) ? c - clone : 0;
gSlide = (index > sCnt) ? sCnt : index;
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-nav')).removeClass("bxr-border-color").addClass("bxr-def-border");
$(this).removeClass("bxr-def-border").addClass("bxr-border-color");
setTimeout(function() {$('#bx_117848907_31005_slider_nav_cont').slick('slickGoTo', gSlide)}, 300);
setTimeout(function() {$('#bx_117848907_31005_slider_cont').slick('slickGoTo', gSlide)}, 300);
});
$(document).ready(function() {
$('#bx_117848907_31005_slider_nav_cont').children(".slick-prev").css("display", "none");
$('#bx_117848907_31005_slider_nav_cont').children(".slick-next").css("display", "none");
$('#bx_117848907_31005_slider_cont').children(".slick-prev").css("display", "none");
$('#bx_117848907_31005_slider_cont').children(".slick-next").css("display", "none");
$('#bx_117848907_31005_slider_wrap').show();
$('#bx_117848907_31005_slider_nav_cont').slick('slickFilter','[data-main="default"]');
$('#bx_117848907_31005_slider_cont').slick('slickFilter','[data-main="default"]');
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-nav:not(.slick-cloned)')[0]).addClass("bxr-border-color");
$($('#bx_117848907_31005_slider_nav_cont'+' .slick-nav:not(.slick-cloned)')[0]).trigger('click');
fancyReinit();
});
$(window).on("load", function() {
setSlideSizes();
});
$(document).on("mouseover", '#bx_117848907_31005_slider_nav_cont', function() {
hideArrows(this, "block");
});
$(document).on("mouseover", '#bx_117848907_31005_slider_cont', function() {
hideArrows(this, "block");
});
$(document).on("mouseout", '#bx_117848907_31005_slider_nav_cont', function() {
hideArrows(this, "none");
});
$(document).on("mouseout", '#bx_117848907_31005_slider_cont', function() {
hideArrows(this, "none");
});
$(window).resize(function() {
setSlideSizes();
});
function hideArrows(elem, display) {
$(elem).children(".slick-prev").css("display", display);
$(elem).children(".slick-next").css("display", display);
}
function setSlideSizes() {
border = 4;
width = $('#bx_117848907_31005_slider_nav_cont'+' .slick-list .slick-track .slick-slide').width();
height = width + border;
imgSize = width - 10;
$('#bx_117848907_31005_slider_nav_cont'+' .slick-track .slick-slide').height(height);
$('#bx_117848907_31005_slider_nav_cont'+' .slick-track .slick-slide .slide-wrap').css({'width': height, 'height': height, 'line-height': height+'px'})
}
}
window.setTimeout(function() {slider_init();},10);