%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.17.187.119
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/templates/artlot24/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/templates/artlot24/assets/js/functions.js
$(document).ready(function() {
    $('select').selectric();
	$('.help-list li').on('click', function() {
		if ($(this).hasClass('active'))
		{
            $('.help-list__hide', $(this)).slideUp();
            $(this).removeClass('active');

		} else {
            $('.help-list__hide', $(this)).slideDown();
            $(this).addClass('active');

        }
	});

$('.btn-modal').on('click', function(e){
	e.preventDefault();
	var t = $(this).data('target');
	$('#'+t).fadeIn();
	$('body').addClass('modal-open');
});
$('.modal').on('click', function(e){
    if($(e.target).closest('.modal-dialog').length === 0){
    	$('.modal').fadeOut();
    	$('body').removeClass('modal-open');
    }
});
$('.modal-header .close').on('click', function(e){
	$('.modal').fadeOut();
    $('body').removeClass('modal-open');
});

//  $(document).on('click', '.modal-backdrop, .modal-header .close', function(){
// 	$('.modal, .modal-backdrop').fadeOut();
// 	$('body').removeClass('modal-open');
// });

// window.addEventListener('resize', function () {
	_w = $(window).width();
	if (_w>768)
	{
  $('.list').each(function(){
        var highestBox = 0;
        $('.item ', this).each(function(){
            if($(this).height() > highestBox) {
                highestBox = $(this).height();
            }
        });

        $('.item ',this).height(highestBox);

//         	$('.item').each(function(){

// 		       $('.img-container',this).height($('.content',this).height()+50);
// 		    });
//     });


})
  }




	// header
//	$('header .down .filter').on('click', function() {
//		var val = $(this).find('input[name=archive]').val();
//		if(val==0) {
//			$(this).find('.switch').addClass('on');
//			$(this).find('input[name=archive]').val('1');
//		} else {
//			$(this).find('.switch').removeClass('on');
//			$(this).find('input[name=archive]').val('0');
//		}
//	});
	$('header .up .toggle').on('click', function() {
		$('header .down').toggleClass('visible');
		return false;
	});

	// home slider
	var owl_homeslider = $('.owl-carousel.home-slider');
	$(owl_homeslider).owlCarousel({
            loop: true,
            nav: false,
            dots: true,
            items: 1,
			autoHeight:true,
			lazyLoad: false
	});

	// lot page timer
//	var lot_minutes = $('#lot_min').val();
//	var lot_hours = $('#lot_hrs').val();
//	var lot_seconds = 59;
//	function lot_update() {
//		lot_seconds--;
//		if(lot_seconds < 0) {
//			lot_seconds = 59;
//			lot_minutes--;
//			if(lot_minutes < 0) {
//				lot_minutes = 59;
//				lot_hours--;
//				if(lot_hours < 0) {
//					lot_hours = 10;
//					lot_minutes = 0;
//					lot_seconds = 0;
//				}
//			}
//		}
//		var txt_min = lot_minutes;
//		if(lot_minutes<10) {
//			txt_min = '0' + txt_min;
//		}
//		var txt_hrs = lot_hours;
//		if(lot_hours<10) {
//			txt_hrs = '0' + txt_hrs;
//		}
//		$('section.lot .controls .number[data-type=hours]').html(txt_hrs);
//		$('section.lot .controls .number[data-type=minutes]').html(txt_min);
//	}
//	$('section.lot .controls .buy .currency button').on('click', function() {
//		$('section.lot .controls .buy .currency button.active').removeClass('active');
//		$(this).addClass('active');
//		var price = $(this).attr('data-price');
//		var txt = $(this).attr('data-text');
//		$('section.lot .controls .price').html(price + ' <span>' + txt + '</span>');
////		$('section.lot .controls .input span').html(txt);
////		$('#minPriceTxt').html('Не меньше <span>'+price+'</span> '+txt);
//		return false;
//	});

	// lot of the minute
//	var lotm_minutes = $('#lotm_min').val();
//	var lotm_seconds = $('#lotm_sec').val();
//	function lotm_update() {
//		lotm_seconds--;
//		if(lotm_seconds < 0) {
//			lotm_seconds = 59;
//			lotm_minutes--;
//			if(lotm_minutes < 0) {
//				lotm_minutes = 0;
//			}
//		}
//		if(lotm_seconds==0 && lotm_minutes==0) {
//			lotm_minutes = 1;
//			lotm_seconds = 0;
//		}
//
//		var txt_min = lotm_minutes;
//		if(lotm_minutes<10) {
//			txt_min = '0' + txt_min;
//		}
//		var txt_sec = lotm_seconds;
//		if(lotm_seconds<10) {
//			txt_sec = '0' + txt_sec;
//		}
//		$('section.minute div.num[data-type=min]').html(txt_min);
//		$('section.minute div.num[data-type=sec]').html(txt_sec);
//	}
//	$('section.minute .currency .item').on('click', function() {
//		$('section.minute .currency .item.active').removeClass('active');
//		$(this).addClass('active');
//		$('section.minute .price div.num[data-type=price]').html($(this).attr('data-price'));
//	});

	// change overlay height - нахуя вот это все?
	// function updateOverlays() {
	// 	$('.feed .item').each(function() {
	// 		var newH = $(this).find('.background').height();
	// 		var newW = $(this).find('.background').width();
	// 		$(this).find('.overlay').css('height', newH + 'px');
	// 		$(this).find('.overlay').css('width', newH + 'px');
	// 	});
	// }
	// updateOverlays();
	// $(window).on('resize', updateOverlays);

	// intervals
//	setInterval(function() {
//		lotm_update();
//		lot_update();
//		updateOverlays();
//	}, 1000);
//
//	setInterval(function() {
//		updateOverlays();
//	}, 10);

	// home news
	var owl_homenews = $('.owl-carousel.home-news');
	$(owl_homenews).owlCarousel({
		loop: true,
		nav: false,
		items: 1,
		lazyLoad: true,
		autoHeight:true
	});


	// About
	$('.owl-carousel.crew').owlCarousel({
		loop: true,
		nav: false,
		items: 1,
		lazyLoad: true
	});
	$('.owl-carousel.about').owlCarousel({
		loop: true,
		nav: false,
		items: 1,
		lazyLoad: true
	});
	$('.owl-carousel.about-gallery').owlCarousel({
		center: true,
		loop: true,
		margin: 0,
		nav: false,
		items: 1,
		responsive: {
			1000: {
				items: 2,
			},
		},
		onTranslated: function(e) {
			var index = $('.owl-item.center .item').attr('data-index');
			if(index) {
				$('section.about-gallery .current span').html(index);
			}
		}
	});

	// Lot
	$('.owl-carousel.home-slider').owlCarousel({
		loop: true,
		margin: 0,
		nav: false,
		items: 1,
		lazyLoad: true
	});
	$('.owl-carousel.home-news').owlCarousel({
		loop: true,
		margin: 0,
		nav: false,
		items: 1,
		lazyLoad: true
	});

	// Catalog Tabs
//	$('section.content.lots .tabs .tab').on('click', function() {
//		$('section.content.lots .tabs .tab.active').removeClass('active');
//		$(this).addClass('active');
//		if($(this).attr('data-tab')=='all') {
//			$('section.content.lots .feed .item-new').each(function() {
//				$(this).css('display', 'block');
//			});
//		} else {
//			var tab = $(this).attr('data-tab');
//			$('section.content.lots .feed .item-new').each(function() {
//				$(this).css('display', 'none');
//			});
//			$('section.content.lots .feed .item-new[data-type='+tab+']').each(function() {
//				$(this).css('display', 'block');
//			});
//		}
//	});

	// News-Tabs Tabs
//	$('section.news-full .filter .item').on('click', function() {
//		$('section.news-full .filter .item').removeClass('active');
//		$(this).addClass('active');
//		if($(this).attr('data-tab')=='all') {
//			$('section.news-full .feed .item').each(function() {
//				$(this).css('display', 'block');
//			});
//		} else {
//			var tab = $(this).attr('data-tab');
//			$('section.news-full .feed .item').each(function() {
//				$(this).css('display', 'none');
//			});
//			$('section.news-full .feed .item[data-type='+tab+']').each(function() {
//				$(this).css('display', 'block');
//			});
//		}
//	});

	// Lot page
//	$('section.lot .history .more a').on('click', function() {
//		if($(this).html()=='Показать все') {
//			$(this).html('Свернуть');
//			$('section.lot .history .bid.hidden').each(function() {
//				$(this).css('display', 'flex');
//			});
//		} else {
//			$(this).html('Показать все');
//			$('section.lot .history .bid.hidden').each(function() {
//				$(this).css('display', 'none');
//			});
//		}
//		return false;
//	});
	var lot_pictures_count = $('section.lot .control .imgs img').length;
	var lot_index = 0;
	function updateLotPictures() {
		$('section.lot .control .imgs img').each(function() {
			$(this).addClass('hide');
		});

		$('section.lot .control .imgs img[data-index='+lot_index+']').removeClass('hide').css('order', '0');
		var index = lot_index+1; if(index>=lot_pictures_count) index = 0;
		$('section.lot .control .imgs img[data-index='+index+']').removeClass('hide').css('order', '1');
		index++; if(index>=lot_pictures_count) index = 0;
		$('section.lot .control .imgs img[data-index='+index+']').removeClass('hide').css('order', '2');
	}
	$('section.lot .control .arrow.right').on('click', function() {
		lot_index--;
		if(lot_index<0) lot_index=lot_pictures_count-1;
		updateLotPictures()
	});
	$('section.lot .control .arrow.left').on('click', function() {
		lot_index++;
		if(lot_index>=lot_pictures_count) lot_index=0;
		updateLotPictures()
	});
	$('section.lot .control .imgs img').on('click', function() {
		$('section.lot .control .imgs img.active').removeClass('active');
		$(this).addClass('active');


		$('section.lot .pics .selected img')
            .attr('src', $(this).attr('src'))
            .closest('a').attr('href', $(this).data('href'));
	});

	$('.owl-carousel.contacts').owlCarousel({
		loop: true,
		margin: 0,
		nav: false,
		items: 1,
		lazyLoad: true,
		responsive: {
			576: {
				items: 2
			},
			767: {
				items: 3
			},
			992: {
				items: 4
			}
		}
	});

	// Feedback Form
	$('section.form .file-input a').on('click', function() {
		$('#feedback_file').click();
		return false;
	});
	$('#feedback_file').on('change', function() {
		var len = document.getElementById('feedback_file').files.length;
		$('section.form .file-input .indicator span').html(len);
	});

	// Account Lots Tabs
	$('section.account .my_lots .filter button').on('click', function() {
		$('section.account .my_lots .filter button.active').removeClass('active');
		$(this).addClass('active');
	});

	// faq
	$('section.account .faq ul li').on('click', function() {
		$(this).find('.answer').toggleClass('show');
	});

	$('.owl-carousel.enc-lots').owlCarousel({
		loop: false,
		margin: 0,
		nav: true,
		items: 1,
		navText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"],
		responsive: {
			300: {
				items: 1
			},
			540: {
				item: 2
			},
			760: {
				items: 3
			},
			991: {
				items: 4
			}
		}
	});


    // var sync1 = $(".enc-lots-full");
    // var sync2 = $(".enc-lots-thumb");
    // var slidesPerPage = 4; //globaly define number of elements per page
    // var syncedSecondary = true;

    // sync1.owlCarousel({
    //     items: 1,
    //     slideSpeed: 2000,
    //     nav: false,
    //     autoplay: false,
    //     dots: false,
    //     loop: true,
    //     responsiveRefreshRate: 200,
    // }).on('changed.owl.carousel', syncPosition);

    // sync2
    //     .on('initialized.owl.carousel', function() {
    //         sync2.find(".owl-item").eq(0).addClass("current");
    //     })
    //     .owlCarousel({
    //         items: slidesPerPage,
    //         dots: false,
    //         nav: true,
    //         navText : ["<img src='/theme/kvadrate/img/lot-arrow-l.png' class='arrow left'>","<img src='/theme/kvadrate/img/lot-arrow-r.png' class='arrow right'>"],
    //         smartSpeed: 200,
    //         slideSpeed: 500,
    //         slideBy: slidesPerPage, //alternatively you can slide by 1, this way the active slide will stick to the first item in the second carousel
    //         responsiveRefreshRate: 100
    //     }).on('changed.owl.carousel', syncPosition2);

    // function syncPosition(el) {
    //     //if you set loop to false, you have to restore this next line
    //     //var current = el.item.index;

    //     //if you disable loop you have to comment this block
    //     var count = el.item.count - 1;
    //     var current = Math.round(el.item.index - (el.item.count / 2) - .5);

    //     if (current < 0) {
    //         current = count;
    //     }
    //     if (current > count) {
    //         current = 0;
    //     }

    //     //end block

    //     sync2
    //         .find(".owl-item")
    //         .removeClass("current")
    //         .eq(current)
    //         .addClass("current");
    //     var onscreen = sync2.find('.owl-item.active').length - 1;
    //     var start = sync2.find('.owl-item.active').first().index();
    //     var end = sync2.find('.owl-item.active').last().index();

    //     if (current > end) {
    //         sync2.data('owl.carousel').to(current, 100, true);
    //     }
    //     if (current < start) {
    //         sync2.data('owl.carousel').to(current - onscreen, 100, true);
    //     }
    // }

    // function syncPosition2(el) {
    //     if (syncedSecondary) {
    //         var number = el.item.index;
    //         sync1.data('owl.carousel').to(number, 100, true);
    //     }
    // }

    // sync2.on("click", ".owl-item", function(e) {
    //     e.preventDefault();
    //     var number = $(this).index();
    //     sync1.data('owl.carousel').to(number, 300, true);
    // });

    $('.enc-lots').owlCarousel({
		loop: true,
		margin: 0,
		dots: true,
		nav: true,
		items: 4,
		responsive: {
			300: {
				items: 1
			},
			540: {
				item: 2
			},
			760: {
				items: 3
			},
			991: {
				items: 4
			}
		},
		navText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"]
	});

	$('.owl-carousel.lot-recommended').owlCarousel({
		loop: true,
		margin: 0,
		dots: true,
		nav: true,
		items: 4,
		responsive: {
			300: {
				items: 1,
				dots: false
			},
			540: {
				item: 2,
				dots: false
			},
			760: {
				items: 3
			},
			991: {
				items: 4
			}
		},
		navText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"]
	});
	// updateOverlays();

	// Modals
	$('.modal-close').on('click', function() {
		$(this).closest('div.modal-overlay').removeClass('show');
		$('body').css('overflow-y', 'auto');
		return false;
	});
	$('.modal_auth').on('click', function(e) {
        e.preventDefault();
        e.stopImmediatePropagation();
		$('.modal-overlay.auth').addClass('show');
		$('body').css('overflow-y', 'hidden');
		return false;
	});
	$('.modal_message').on('click', function() {
        var $link = $(this),
            lot = $link.attr('data-lot'),
            $win = $('.modal-overlay.question');
        if(!lot){
            lot = '';
        }
        if ($link.hasClass('bron')) {
        	console.log('bron');
        	$('.heading').html('Забронировать');
        }
        $win.find('input[data-code="LOT"]').val(lot);
		$win.addClass('show');
		$('body').css('overflow-y', 'hidden');
		return false;
	});
	$('.modal_as_buy').on('click', function() {
		var c = '';
		if ($(this).data('u')) {
			c = 'un';
		}
		$('.modal-overlay.as-buy-' + c + 'auth').addClass('show');
		$('body').css('overflow-y', 'hidden');
		return false;
	});
	$('.modal_as_price').on('click', function() {
		var c = '',
			b = $(this);
		if ($(this).data('u')) {
			c = 'un';
		}
		$('.modal-overlay.as-price-' + c + 'auth').addClass('show').find('input[name="my-price"]').val(b.closest('div').find('input[name="my-price"]').val());
		$('body').css('overflow-y', 'hidden');
		return false;
	});
//	$('.modal_buy').on('click', function() {
//		$('.modal-overlay.buy').addClass('show');
//		$('body').css('overflow-y', 'hidden');
//		return false;
//	});

//	$('.modal_hall').on('click', function() {
//		$('.modal-overlay.hall').addClass('show');
//		$('body').css('overflow-y', 'hidden');
//		return false;
//	});
//	$('.modal_price').on('click', function() {
//		$('.modal-overlay.price').addClass('show');
//		$('body').css('overflow-y', 'hidden');
//		return false;
//	});

	// encyclopedia - change lang
	$('section.enc .alphabet button').on('click', function() {
		var lang = $(this).attr('data-lang');
		if(lang=='ru') {
			$(this).attr('data-lang', 'en');
			$(this).find('span').html('RU');
			$('section.enc .alphabet .list.ru').removeClass('show');
			$('section.enc .alphabet .list.en').addClass('show');
		} else {
			$(this).attr('data-lang', 'ru');
			$(this).find('span').html('EN');
			$('section.enc .alphabet .list.en').removeClass('show');
			$('section.enc .alphabet .list.ru').addClass('show');
		}
	});

	// Form Validation
//	$('form.reg').submit(function(e) {
//		$('form.reg').find('input.phone').removeClass('error');
//		$('input.pass1').removeClass('error');
//		$('input.pass2').removeClass('error');
//		if($('form.reg').attr('data-status')!='valid') {
//			e.preventDefault();
//			var phone = $('form.reg').find('input.phone').val();
//			var phoneno = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
//			if(phone.match(phoneno)) {
//				if($('input.pass1').val() == $('input.pass2').val()) {
//					if($('#reg_agreement').prop('checked')) {
//						$('form.reg').attr('data-status', 'valid');
//						$('form.reg').submit();
//					} else {
//						alert('Вы должны дать согласие на обработку Ваших персональных данных');
//					}
//				} else {
//					$('input.pass1').addClass('error');
//					$('input.pass2').addClass('error');
//					alert('Введенные пароли не совпадают');
//				}
//			} else {
//				$('form.reg').find('input.phone').addClass('error');
//				alert('Введите номер телефона в формате XXX-XXX-XXXX');
//			}
//		}
//	});
	$('form.login .forget').on('click', function() {
		if($('form.login').find('input[name=action]').val()=='login') {
			$('form.login input[name=action]').val('forget');
			$('form.login input[type=password]').css('display', 'none').prop('disabled', true);
			$('form.login .forget').html('Вернуться к форме авторизации');
			$('form.login .heading').html('Напомнить пароль');
		} else {
			$('form.login input[name=action]').val('login');
			$('form.login input[type=password]').css('display', 'block').prop('disabled', false);
			$('form.login .forget').html('Забыли пароль?');
			$('form.login .heading').html('Вход');
		}
		return false;
	});

	$('input.phone').mask('+7 (999) 999-99-99');

	/*var autocompleteData = [
		"Антиквариат", "Бижутерия", "Бронза",
		"Винтаж", "Вазы", "Живопись",
		"Зеркала", "Иконы", "Коллекции",
		"Книги", "Мебель", "Скульптура",
		"Фотография", "Часы"
	];
	$('.search input').autocomplete({
		source: autocompleteData
	});*/

//	window.initial_menu_content = $('[data-toggle="menu-content"].active').data('item-id');
//
//	function hoverOnItemMenu(id){
//		if(window.innerWidth < 1260)
//			return;
//		$('[data-toggle="menu-content"]').removeClass('active');
//
//		$('[data-toggle="menu-content"][data-item-id="' + id + '"]').addClass('active');
//
//		$('.menu-content').addClass('d-none');
//
//		$(id).removeClass('d-none');
//	}
//
//	$('[data-toggle="menu-content"]').hover(function(){
//		hoverOnItemMenu($(this).data('item-id'));
//		clearInterval(window.menu_content_interval);
//	}, function(){
//		window.menu_content_interval = setInterval(() => {
//			if($('header .menu-content:hover').length == 0 && $('header .down:hover').length == 0){
//				hoverOnItemMenu(window.initial_menu_content);
//				clearInterval(window.menu_content_interval);
//			}
//		}, 100);
//	})

//	$(".search .input input").focus(function(){
//		$(this).parent().parent().find('.input-autocomplete').removeClass('d-none');
//	});
//
//	$(".search .input input").blur(function(){
//		$(this).parent().parent().find('.input-autocomplete').addClass('d-none');
//	});
//
//	$(".search .input input").keyup(function(){
//		$(this).parent().parent().find('.input-autocomplete__list').html('<div class="text-center m-3">Ничего не найдено</div>');
//		if($(this).val().length > 2){
//			$(this).parent().parent().find('.input-autocomplete__list').html('');
//			$(this).parent().parent().find('.input-autocomplete__list').append(`
//				<div class="input-autocomplete__wrapper">
//					<a href="#" class="input-autocomplete__link media">
//					  <img class="mr-3" src="https://artlot24.ru/files/items/151_thumbnail.jpg?1450101164" alt="Набор из 6 пивных кружек с кувшином">
//					  <div class="input-autocomplete__body">
//					    <div class="input-autocomplete__heading">Набор из 6 пивных кружек с кувшином</div>
//					    <p class="input-autocomplete__text">Набор из 6 пивных кружек с кувшином. Фаянс, лепка, олово. Германия. 1920 г. Кувшин 41 см, кружки 17 см.</p>
//					  </div>
//					</a>
//				</div>
//			`);
//			$(this).parent().parent().find('.input-autocomplete__list').append(`
//				<div class="input-autocomplete__wrapper">
//					<a href="#" class="input-autocomplete__link media">
//					  <img class="mr-3" src="https://artlot24.ru/files/items/151_thumbnail.jpg?1450101164" alt="Набор из 6 пивных кружек с кувшином">
//					  <div class="input-autocomplete__body">
//					    <div class="input-autocomplete__heading">Набор из 6 пивных кружек с кувшином</div>
//					    <p class="input-autocomplete__text">Набор из 6 пивных кружек с кувшином. Фаянс, лепка, олово. Германия. 1920 г. Кувшин 41 см, кружки 17 см.</p>
//					  </div>
//					</a>
//				</div>
//			`);
//			$(this).parent().parent().find('.input-autocomplete__list').append(`
//				<div class="input-autocomplete__wrapper">
//					<a href="#" class="input-autocomplete__link media">
//					  <img class="mr-3" src="https://artlot24.ru/files/items/151_thumbnail.jpg?1450101164" alt="Набор из 6 пивных кружек с кувшином">
//					  <div class="input-autocomplete__body">
//					    <div class="input-autocomplete__heading">Набор из 6 пивных кружек с кувшином</div>
//					    <p class="input-autocomplete__text">Набор из 6 пивных кружек с кувшином. Фаянс, лепка, олово. Германия. 1920 г. Кувшин 41 см, кружки 17 см.</p>
//					  </div>
//					</a>
//				</div>
//			`);
//		}
//	})

    $('.owl-carousel.reviews').owlCarousel({
		loop: true,
		margin: 0,
		nav: false,
		items: 1,
	});


//	function updateSteps() {
//		var pos = $(window).scrollTop();
//		var start = $('section.steps .dot-top').offset().top;
//		var end = $('section.steps .dot-bottom').offset().top;
//
//		if( (pos>=start/2) && pos<=end-(start/2-20) ) {
//			var margin = pos-(start/2);
//			$('section.steps .indicator').css('margin-top', margin+'px');
//
//			var step1 = ($('section.steps .icon[data-index=1]').offset().top) - (start/2);
//			if(pos>step1) {
//				$('section.steps .icon[data-index=1]').addClass('done');
//			} else {
//				$('section.steps .icon[data-index=1]').removeClass('done');
//			}
//
//			var step2 = ($('section.steps .icon[data-index=2]').offset().top) - (start/2);
//			if(pos>step2) {
//				$('section.steps .icon[data-index=2]').addClass('done');
//			} else {
//				$('section.steps .icon[data-index=2]').removeClass('done');
//			}
//
//			var step3 = ($('section.steps .icon[data-index=3]').offset().top) - (start/2);
//			if(pos>step3) {
//				$('section.steps .icon[data-index=3]').addClass('done');
//			} else {
//				$('section.steps .icon[data-index=3]').removeClass('done');
//			}
//
//			var step4 = ($('section.steps .icon[data-index=4]').offset().top) - (start/2);
//			if(pos>step4) {
//				$('section.steps .icon[data-index=4]').addClass('done');
//			} else {
//				$('section.steps .icon[data-index=4]').removeClass('done');
//			}
//		}
//	}
//    if ($('section.steps').length) {
//        $(window).on('scroll', function(e) {
//            updateSteps();
//        });
//    }
});

Youez - 2016 - github.com/yon3zu
LinuXploit