$(document).ready(function() {
    $("#show-password").mousedown(function() {
        $("#password").attr("type", "text");
        $('.passwordShowButton .icon-eye').addClass('hide');
        $('.passwordShowButton .icon-eye-off').removeClass('hide');
    }).mouseup(function () {
        $("#password").attr("type", "password");
        $('.passwordShowButton .icon-eye').removeClass('hide');
        $('.passwordShowButton .icon-eye-off').addClass('hide');
    });
});