$(document).ready(function(){ function catalogconttenPopup() { $('.image-popup').magnificPopup({ type: 'image' }); } function catalogconttenHeight(columns) { if ($(window).width() > 992) { var tallestcolumn = 0; columns.each( function() { currentHeight = $(this).height(); if (currentHeight > tallestcolumn) { tallestcolumn = currentHeight; } } ); columns.height(tallestcolumn); } } function catalogconttenHidden() { $('.catalogcontten-item-hidden-img').css('z-index', '2'); $('.catalogcontten-item-hidden').css('z-index', '1'); } function catalogconttenChangeAttr() { var children = document.querySelectorAll('.catalogcontten-item-img'); var parents = document.querySelectorAll('.catalogcontten-item-img-wrap'); for (var i = 0; i < children.length; i++) { var attr = children[i].getAttribute('src'); parents[i].setAttribute('href', attr); } } function catalogconttenShow() { var stepslider = document.getElementsByClassName('catalogcontten'); stepslider[0].setAttribute("data-wow-duration", "1.5s" ); var stepitem = document.getElementsByClassName('catalogcontten-item-wrap'); var s = 0.3; for (var i = 0; i < stepitem.length; i++) { stepitem[i].setAttribute('data-wow-delay', s+"s"); s = s+0.15; } } catalogconttenChangeAttr(); catalogconttenPopup(); catalogconttenHeight($(".catalogcontten-item")); catalogconttenHidden(); catalogconttenShow(); });