Try this for postal
$("input .postal").blur( function() {
$(this).val( number.replace(/^(\d{5})(\d{3})$/, '$1-$2') );
});
and this for phone
$("input .phone").blur( function() {
$(this).val( number.replace(/^(\d{4})(\d{4})$/, '$1 - $2') );
});