PageSourceSearch

http://www.factoriasvulcano.com/assets/js/home.js

js factoriasvulcano.com collected 2026-09-26 12:46:06 UTC 4,932 bytes, 165 lines download raw bytes

1var videoHome = document.getElementById("videoHome");
2var counter = 0;
3var startTrans = 3;
4var endBlock = 30;
5
6// startTrans = 0;
7// endBlock = 0;
8
9var minScale = 1;
10var shipMaxScale = 1.1;
11var craneMaxScale = 1.05;
12var workerMaxScale = 1.5;
13var textMaxScale = 1.05;
14
15window.init_zoombox_settings = {
16    settings_zoom_doNotGoBeyond1X: 'off',
17    design_skin: 'skin-nebula',
18    settings_enableSwipe: 'off',
19    settings_enableSwipeOnDesktop: 'off',
20    settings_galleryMenu: 'dock',
21    settings_useImageTag: 'on',
22    settings_paddingHorizontal: '100',
23    settings_paddingVertical: '100',
24    settings_disablezoom: 'off',
25    settings_transition: 'fade',
26    settings_transition_out: 'fade',
27    settings_transition_gallery: 'slide',
28    settings_disableSocial: 'on',
29    settings_zoom_use_multi_dimension: 'off'
30};
31
32$("#videoHome").on("loadeddata", function () {
33    playVid();
34});
35
36setInterval(function () {
37    playVid();
38}, 1000);
39
40$(function(){
41    opacidad = 0;
42    document.addEventListener("wheel", event =>{ 
43        // if ($(window).scrollTop() < $(window).height()) {
44        if(event.deltaY < 0){
45            counter -= 1;
46        }else if(event.deltaY > 0){
47            counter += 1;
48        }
49            
50        // }
51        if(counter < 40 && $(window).scrollTop() == 0){
52            event.preventDefault();
53            event.stopPropagation();
54        }
55        // if (counter == 20) playVid();
56        if (counter < 0)counter = 0;
57        if (endBlock >= counter && $(window).scrollTop() == 0) {
58            // if (counter >= startTrans) {
59                if ((counter - startTrans) < 10){
60                    opcCon = (counter - startTrans) * 4;
61                    if (opcCon < 0) opcCon = 0;
62                    opcCon = ("0" + opcCon).slice(-2);
63                    opacidad = 1 - Number('0.' + opcCon);
64                } else {
65                    opacidad = 0;
66                }
67            
68                $(".crane").stop().animate({opacity: opacidad}, 700, 'easeOutCubic');
69                $(".ship").stop().animate({opacity: opacidad}, 700, 'easeOutCubic');
70                $(".worker").stop().animate({opacity: opacidad}, 700, 'easeOutCubic');
71                $(".backgroundBannerHome").stop().animate({opacity: opacidad}, 700, 'easeOutCubic');
72                
73                $('.logoBlack').stop().animate({opacity: opacidad}, 700, 'easeOutCubic');
74                
75                opaUp = 1 - opacidad;
76                $('.logoWhite').stop().animate({opacity: opaUp}, 700, 'easeOutCubic');
77
78                if (opaUp == 1){
79                    $('.btMenu').addClass('white');
80                } else {
81                    $('.btMenu').removeClass('white');
82                }
83            // }
84            
85            $('.ship').css('transform', 'scale(' + calcScale(shipMaxScale) + ')');
86            $('.crane').css('transform', 'scale(' + calcScale(craneMaxScale) + ')');
87            $('.worker').css('transform', 'scale(' + calcScale(workerMaxScale) + ')');
88            $('#bannerHome h1').css('transform', 'scale(' + calcScale(textMaxScale) + ')');
89
90            if(delta > 0 && $(window).scrollTop() > 0){
91                return true;
92            } else {
93                event.stopPropagation();
94                // console.log('asasa');
95                // $(document).scrollTop(0);
96                // return false;
97
98            }
99        }
100    },{passive:false});
101
102    $('#contacto').submit(function () {
103        sendFormContacto();
104        return false;
105    });
106
107    // $('.check1').change(function () {
108    //     if ($(this).next('.check').text().length == 0) {
109    //         $(this).parent().append('<span class="check">&#10004;</span>');
110    //     } else {
111    //         $(this).next('.check').remove();
112    //     }
113    // });
114    // $('.check2').change(function () {
115    //     if ($(this).next('.check').text().length == 0) {
116    //         $(this).parent().append('<span class="check">&#10004;</span>');
117    //     } else {
118    //         $(this).next('.check').remove();
119    //     }
120    // });
121
122
123    $('.carouselCategorias').slick({
124        dots: false,
125        infinite: false,
126        speed: 300,
127        variableWidth: true,
128        centerMode: false,
129    });
130
131
132});
133
134function playVid() { 
135    videoHome.play(); 
136} 
137
138function pauseVid() { 
139    videoHome.pause(); 
140}
141
142function calcScale(max){
143    escala = ((max - minScale) / startTrans) * counter;
144    escala = escala + 1;
145    return escala;
146}
147
148function sendFormContacto() {
149    var email = $('.group .email').val();
150    var nombre = $('.group .nombre').val();
151    var comentario = $('.group .comentario').val();
152
153    $('.enviando').show();
154
155    $.myAjax(aargs.ajaxurl + 'forms/contacto.php', {
156        email: email,
157        nombre: nombre,
158        comentario: comentario
159    }).done(function (data) {
160        if (data.Result == 'OK') {
161            $('.enviado').show();
162            $('.enviando').hide();
163        }
164    });
165}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.