Mini Shell

Direktori : /home/brasafestival/www/old/bkp_2023/app/webroot/js/
Upload File :
Current File : /home/brasafestival/www/old/bkp_2023/app/webroot/js/js.js

$(document).ready(function(){
    
    $('.openmenu, .button-close').click(function(){
        $('#bgmenu').toggle(); 
    });
    
    $('#bgmenu a').click(function(){
        var secao = this.id;
        var ww = window.innerWidth;
        
        if(ww <= 600){
            $('#bgmenu').hide();
        }
        
        $('html,body').animate({scrollTop:$('#sec-'+secao).offset().top }, 848);
    });
    
    $('.select-vg').click(function(){
        $('.select-vg').removeClass('active');
        $(this).addClass('active');
        $('.content-vg').hide();
        $('#vg_'+this.id).show();
    });
        
    $('.bg-gallery').magnificPopup({
        delegate: 'a',
        type: 'image',
        tLoading: 'Carregando imagem #%curr%...',
        mainClass: 'mfp-img-mobile',
        gallery: {
            enabled: true,
            navigateByImgClick: true,
            preload: [0,1]
        },
        image: {
            tError: '<a href="%url%">Imagem não carregada.',
        }
    });
    
    $('.more-me').click(function(){
        $('#outras_estacoes').slideToggle(); 
    });
    
//    $('.menu-footer a').click(function(){
//        var secao = $(this).attr('data-link');
//        var ww = window.innerWidth;
//        
//        if(ww <= 600){
//            $('#bgmenu').hide();
//        }
//        
//        $('html,body').animate({scrollTop:$('#sec-'+secao).offset().top }, 848);
//    });
    
//    $('.bs-contact').click(function(){
//        var formID = document.getElementById("ContatoIndexForm");
//        if(formID.checkValidity()) {
//            $(this).hide();
//            $("#msg-contact").show();
//        }
//    });
});

//$(window).bind("pageshow", function() {
//    $('.msg-send-form').hide();
//    $('..bs-contact, .bs-contact-foto, .bs-contact-tabela').show();
//});

function SomenteNumero(e){
    var tecla=(window.event)?event.keyCode:e.which;   
    if((tecla>47 && tecla<58)) return true;
    else{
        if (tecla==8 || tecla==0) return true;
        else  return false;
    }
}

function mascara(o,f){
    v_obj = o;
    v_fun = f;
    setTimeout("execmascara()",1);
}

function execmascara(){
    v_obj.value=v_fun(v_obj.value)
}

function mtel(v){
    v=v.replace(/\D/g,"");             
    v=v.replace(/^(\d{2})(\d)/g,"($1) $2"); 
    v=v.replace(/(\d)(\d{4})$/,"$1-$2");    
    return v;
}

Zerion Mini Shell 1.0