How to get the jQuery MaskedInput unmask() function to work properly?

https://code.jquery.com/jquery-latest.min.js
https://igorescobar.github.io/jQuery-Mask-Plugin/js/jquery.mask.min.js
http://cloudfour.github.io/hideShowPassword/hideShowPassword.min.js

<input class="hideshowpwd cep" id="password-2" type="text" placeholder="Password" autocapitalize="off" autocomplete="off" spellcheck="true" style="margin: 0px; padding-right: 41px;">

$(document).ready(function(){
$('.cep').mask('000-00-0000');
$('.hideshowpwd').hidePassword('focus', {
toggle: { className: 'my-toggle' }
});
$('.my-toggle').click(function(){
var mask = "000-00-0000";
if($(this).hasClass('hideShowPassword-toggle-show')){
var unmaskval = $("#password-2").unmask(mask);
$('#password-2').removeClass('cep');
}else{
$("#password-2").mask(mask);
}
});
});

Preventing session expiration with AJAX

var refreshTime = 600000; // every 10 minutes in milliseconds
window.setInterval( function() {
    $.ajax({
        cache: false,
        type: "GET",
        url: "refreshSession.php",
        success: function(data) {
        }
    });
}, refreshTime );

 $(document).ready( function() {
        var refreshTime = 600000; // in milliseconds, so 10 minutes
        window.setInterval( function() {
            var url = 'http://mysite.mydomain/refreshSessionURL';
            $.get( url );
        }, refreshTime );
    });