Famiglie Prodotti
(function (){
var app = new APP(), newsCont = $('.news-img-wrapper'), imgW = 0.00, //newsActive = 0, tot_news_rows = 3, tot_prod_rows = 4, newsCmd = $('.news-control'), pageCmd = $('.paginator-control'), reticoloImgFade = $('.reticolo-img-fade'), newsRow = $('.news-slide');
app.init();
// --- CATEGORIE ---------------------------------------------------- $('.cat-img').hover(function(){
$(this).find('.cat-subtitle-overlay').stop().animate({'bottom' : 0 }, 200);
}, function(){
$(this).find('.cat-subtitle-overlay').stop().animate({'bottom' : -200 }, 200); });
var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer, return version number { console.log('IE') } else { $('.prod-img').flip({ trigger : 'hover' }); }
// --- VIDEO -------------------------------------------------- $('.reticolo-cmd').click(function(){
$(this).parent().find('video').click(); });
$('.reticolo-video video').click(function(){
var video = $(this)[0], isFullScreen = $(this).data('fullscreen') === true;
if( !isFullScreen ){
video.muted = false; $(this).data('fullscreen',true); $(this) .hide() .css({ 'position' : 'fixed', 'bottom' : 0, 'left' : 0, 'width' : '100%', 'z-index' : 600}) .fadeIn();
} else {
$(this).data('fullscreen',false); video.muted = true; $(this) .hide() .css({ 'position' : 'static', 'bottom' : 'auto', 'left' : 'auto', 'width' : '100%', 'z-index' : 1}) .fadeIn();
}
//$(this).toggleClass('fa-play fa-pause'); });
// --- SLIDE ---------------------------------------------------- $('.slide.active .slide-elm').css({'top':0,'opacity':1});
pageCmd.click(function(){
var slideToShow = false, slideCont = $('#'+$(this).closest('.paginator').data('ofslide')), tot_rows = slideCont.data('totrows'), slideActive = slideCont.find('.slide.active'), slide = slideCont.find('.slide'), slide_page_ind = $(this).closest('.paginator'), actualPage = slideActive.data('page'), delay = 0;
if($(this).hasClass('next')) slideToShow = actualPage === tot_rows-1 ? 0 : actualPage+1; else slideToShow = actualPage === 0 ? tot_rows-1 : actualPage-1;
slide .css("display", "flex") .hide() .removeClass('active');
slide.find('.slide-elm').attr('style','');
slide .eq(slideToShow) .show() .addClass('active') .find('.slide-elm').each(function(){
$(this).stop().delay(delay).animate({'top':0,'opacity':1},500); delay+=200 });
slide_page_ind.find('.fa-circle').toggleClass('fa-circle fa-circle-thin'); slide_page_ind.find('i').eq(slideToShow).toggleClass('fa-circle fa-circle-thin');
});
$('#pesaggioUrbano').hover(function(){
$(this).find('.reticolo-img .img-hover').fadeIn();
}, function(){
$(this).find('.reticolo-img .img-hover').fadeOut();
});
$('.anchor').click(function(){
window.location.href = $(this).data('href'); });
function fadeCarousel(){
var img = reticoloImgFade.find('img.active');
var imgToShow = img.is(':last-child') ? reticoloImgFade.find('img').eq(0) : img.next();
reticoloImgFade.find('img').removeClass('active').not(imgToShow).fadeOut(); imgToShow.fadeIn().addClass('active'); }
window.setInterval(function(){
fadeCarousel();
}, ۲۰۰۰)
})()