Your IP : 216.73.216.170


Current Path : /home/bitrix/ext_www/vebeng.yacl.site/
Upload File :
Current File : /home/bitrix/ext_www/vebeng.yacl.site/main.js

$(document).ready(function(){
   
    
    
    $(window).resize(function(){

    })
    $('.desc_title_slider').slick({
        infinite: true,
        slidesToShow: 1,
        slidesToScroll: 1,
        fade: true,
        arrows: false,
        speed: 700,
        swipe: false
    });
    $('.desc .slider_control .prev').click(function(){
        $('.desc_title_slider').slick('slickPrev');
        var currentSlide = $('.desc_title_slider').slick('slickCurrentSlide');
        $('.slider_control .p-1 span').html(currentSlide+1);
        $('.desc_bg').hide();
        $('.desc_bg[data-descbg="'+(currentSlide+1)+'"]').fadeIn(1400);
        if(currentSlide+1 == 1){
            player.seekTo(0)
        }
    })
    $('.desc .slider_control .next').click(function(){
        $('.desc_title_slider').slick('slickNext');
        var currentSlide = $('.desc_title_slider').slick('slickCurrentSlide');
        $('.slider_control .p-1 span').html(currentSlide+1);
        $('.desc_bg').hide();
        $('.desc_bg[data-descbg="'+(currentSlide+1)+'"]').fadeIn(1400);
        if(currentSlide+1 == 1){
            player.seekTo(0)
        }
    })
  /*  $(".desc").on("swipeleft ",function(){
        $('.desc .slider_control .next').click();
    });   
    $(".desc").on("swiperight",function(){
        $('.desc .slider_control .prev').click();
    });   */
   
    var myVar1;
    var myVar2;
    var myVar3;
    var cur_slide=1;
   if(cur_slide==1){
        myVar1 = setTimeout(function(){
            $('.desc .slider_control .next').click();
        },8000) ;
    }
    setInterval(function(){
        var currentSlide2 = $('.desc_title_slider').slick('slickCurrentSlide') + 1;
        if(currentSlide2!=cur_slide){
            clearTimeout(myVar1);
            clearTimeout(myVar2);
            clearTimeout(myVar3);
            if(currentSlide2==1){
                myVar1 = setTimeout(function(){
                    $('.desc .slider_control .next').click();
                },8000) ;
            }
            if(currentSlide2==2){
                myVar2 = setTimeout(function(){
                    $('.desc .slider_control .next').click();
                },8000);
            }
            if(currentSlide2==3){
                myVar3 = setTimeout(function(){
                    $('.desc .slider_control .next').click();
                },9000);
            }
            cur_slide=currentSlide2;
        }
    },1);
    $('.press_center .press_wrap .big_item .vid .poster').click(function(){
        $(this).fadeOut();
      $("#pres_vid")[0].src += "?rel=0&autoplay=1";
    })

    $('.map_ar').hover(function(){
        var th_dat = $(this).data('mapar');
        $('.proj_map .under_map_it').removeClass('active');
       
        $('.proj_map .map_zone').removeClass('active');
        $('.map_zone[data-mpzone="'+th_dat+'"]').addClass('active');
    },function(){
        $('.proj_map .under_map_it').removeClass('active');
        $('.proj_map .map_zone').removeClass('active');
    });
    
    $('.under_map_it').hover(function(){
        var th_dat = $(this).data('mapars');
        $('.proj_map .under_map_it').removeClass('active');
        $(this).addClass('active');
        $('.proj_map .map_zone').removeClass('active');
        $('.map_zone[data-mpzone="'+th_dat+'"]').addClass('active');
    },function(){
        $('.proj_map .under_map_it').removeClass('active');
        $('.proj_map .map_zone').removeClass('active');
    })
    
   /* var begin_ind = $('.map_zone.active').data('mpzone');
    var focus_true=0;
    $('.proj_map').hover(function(){
        focus_true=1;  
    },function(){
        if(focus_true==1){
            $('.proj_map .map_zone').removeClass('active');
            $('.map_zone[data-mpzone="'+begin_ind+'"]').addClass('active');
            $('.proj_map .under_map_it[data-mapars="'+begin_ind+'"]').addClass('active');
            focus_true=0;
        }
       
    })*/
    
    $('.map_control_wrap .item').click(function(event){
        event.preventDefault();
        var th_d =  $(this).data('mpcnt');
        $('.map_control_wrap .item').removeClass('active');
        $(this).addClass('active');
        $('.project_cont_wrap .content_wrap').hide();
        $('.project_cont_wrap .content_wrap[data-contwr="'+th_d+'"]').fadeIn();
    });
    
    $('.search_lupa').click(function(){
        $(this).hide();
        $('.ser_open').show();
        $('.ser_open input').focus();
    })
    
    
    $('.company_control .item').click(function(event){
        if($(this).parent().hasClass('companyAbout')==false){
            event.preventDefault();
            $('.company_control .item').removeClass('active');
            $(this).addClass('active');
            var ths_data = $(this).data('co_ind');
            $('.company_content').hide();
            $('.company_content[data-co_indx="'+ths_data+'"]').fadeIn();
        }
    })
    
    var act_water = $(".project_content_1 .project_carousel").waterwheelCarousel({
        separation: 410,
        autoPlay: 2000,
        speed: 600,
        movedToCenter: function(){
            var ind = $('.project_content_1 .carousel-center').data('ind');
            $('.project_content_1 .slide').hide();
            $('.project_content_1 .slide[data-indx="'+ind+'"]').fadeIn(700);
        }
    });

    
    $('.project_control .item').click(function(event){
        event.preventDefault();
        $('.project_control .item').removeClass('active');
        $(this).addClass('active');
        var ths_data = $(this).data('pr_ind');
        $('.project_content').hide().removeClass('active');
        $('.project_content[data-pr_indx="'+ths_data+'"]').fadeIn().addClass('active');
         
        
        
        $(".project_content_"+ ths_data ).addClass("active").show();
        if( $(".project_content_"+ ths_data ).hasClass('slide_off')){
            act_water = $(".project_content_"+ ths_data +" .project_carousel").waterwheelCarousel({
                separation: 410,
                autoPlay: 2000,
                speed: 600,
                movedToCenter: function(){
                    var ind = $('.project_content_'+ ths_data +' .carousel-center').data('ind');
                    $('.project_content_'+ ths_data +' .slide').hide();
                    $('.project_content_'+ ths_data +' .slide[data-indx="'+ind+'"]').fadeIn(700);
                }
            });
            $(".project_content_"+ ths_data ).removeClass('slide_off').addClass('slide_on')
        }
        
    })


    $('.project_carousel .prev').click(function(){
        act_water.prev()
    })
    $('.project_carousel .next').click(function(){
        act_water.next();
    })
    
   /* $(".project_content_wrap").on("swipeleft ",function(){
        $('.project_carousel .next').click();
    });   
    $(".project_content_wrap").on("swiperight",function(){
        $('.project_carousel .prev').click();
    });
    */
    
    
    setTimeout(function(){
        $('#map_canvas').animate({opacity: 1}, 1000);
    },1000)
    $(window).scroll(function (event) {
        var scroll = $(window).scrollTop();
        if(scroll>90){
            $('.top_plashka').addClass('sticky');
        }else{
            $('.top_plashka').removeClass('sticky');
        }
    });
    $('.polit_check').click(function(){
        if($('.polit_check input').prop("checked")){
            $('.right_contacts .main_btn2').removeClass('disable').prop("disabled", false );
        }else{
            $('.right_contacts .main_btn2').addClass('disable').prop("disabled", true);
        }
    })
   
 =
    $('.mod1Go').click( function(event){ 
        event.preventDefault(); 
        $('.overlay').fadeIn(400, 
                             function(){ 
            $('.polit_modal').css('display', 'block') 
                .animate({opacity: 1, top: '100px'}, 200); 
        });
    });
    $('.mod2Go').click( function(event){ 
        event.preventDefault(); 
        $('.overlay').fadeIn(400, 
                             function(){ 
            
            $('.zayav_modal').css('display', 'block') 
                .animate({opacity: 1, top: '100px'}, 200); 
        });
    });
    
    
    $('.mod3Go').click( function(event){ 
        event.preventDefault(); 
        $('.overlay').fadeIn(400, 
                             function(){ 

            $('.thk_modal').css('display', 'block') 
                .animate({opacity: 1, top: '100px'}, 200); 
        });
    });
    
    $('.overlay').click( function(){ 	
        $('.zayav_modal').animate({opacity: 0, top: '45%'}, 200, 
                                  function(){ 
            $(this).css('display', 'none'); 
            $('.overlay').fadeOut(400);
        }
                                 );
    });
    
    
    
    $('.close_politic_2').click( function(){ 	
        $('.polit_modal').animate({opacity: 0, top: '45%'}, 200, 
                                  function(){ 
            $(this).css('display', 'none');
        }                      );
    });
    $('.close_politic_1, .overlay').click( function(){ 	
        $('.polit_modal').animate({opacity: 0, top: '45%'}, 200, 
                                function(){ 
            $(this).css('display', 'none'); 
            $('.overlay').fadeOut(400);
        }
                     );
    });
    
    $('.zayav_close, .overlay').click( function(){ 	
        $('.zayav_modal').animate({opacity: 0, top: '45%'}, 200, 
                                  function(){ 
            $(this).css('display', 'none'); 
            $('.overlay').fadeOut(400);
        }
                                 );
    });
    
    
    
    $('.overlay, .closte_thk').click( function(){ 	
        $('.thk_modal').animate({opacity: 0, top: '45%'}, 200, 
                                  function(){ 
            $(this).css('display', 'none'); 
            $('.overlay').fadeOut(400);
        }
                                 );
    });
    
    $('.burger_menu').click(function(){
        $('.hid_menu').slideToggle();
    })
    $(window).resize(function(){
        if($(window).width()>633){
            $('.hid_menu').hide();
        }
    })
    
    $('map').imageMapResize();
    
});