/*
Input Mask plugin extensions
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2013 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
Version: 0.0.0

Phone extension.
When using this extension make sure you specify the correct url to get the masks

 $(selector).inputmask("phone", {
                url: "Scripts/jquery.inputmask/phone-codes/phone-codes.json", 
                onKeyValidation: function () { //show some metadata in the console
                    console.log($(this).inputmask("getmetadata")["name_en"]);
                } 
  });


*/
$.extend($.inputmask.defaults.aliases, {
    'phone': {
        url: "phone-codes/phone-codes.json",
        mask: function (opts) {
            opts.definitions = {
                'p': {
                    validator: function () { return false; },
                    cardinality: 1
                },
                '#': {
                    validator: "[0-9]",
                    cardinality: 1
                }
            };
            var maskList = [];
            $.ajax({
                url: opts.url,
                async: false,
                dataType: 'json',
                success: function (response) {
                    maskList = response;
                }
            });

            maskList.splice(0, 0, "+p(ppp)ppp-pppp");
            return maskList;
        }
    }
});



@@ -616,16 +616,36 @@
 );%0A%0A%0A*/%0A
+(function ($) %7B%0A    
 $.extend
@@ -673,24 +673,28 @@
 .aliases, %7B%0A
+    
     'phone':
@@ -700,24 +700,28 @@
 : %7B%0A        
+   
+ 
 url: %22phone-
@@ -749,24 +749,28 @@
 n%22,%0A        
+    
 mask: functi
@@ -777,24 +777,28 @@
 on (opts) %7B%0A
+    
             
@@ -838,15 +838,23 @@
     
+    
 'p': %7B%0A
+    
     
@@ -923,32 +923,36 @@
                 
+    
 cardinality: 1%0A 
@@ -966,16 +966,20 @@
         
+    
 %7D,%0A     
@@ -993,15 +993,23 @@
     
+  
+  
 '#': %7B%0A
+    
     
@@ -1056,32 +1056,36 @@
                 
+    
 cardinality: 1%0A 
@@ -1091,34 +1091,42 @@
                 
-%7D%0A
+    %7D%0A    
             %7D;%0A 
@@ -1136,16 +1136,20 @@
         
+    
 var mask
@@ -1171,16 +1171,20 @@
         
+    
 $.ajax(%7B
@@ -1196,24 +1196,28 @@
             
+ 
+   
 url: opts.ur
@@ -1235,16 +1235,20 @@
         
+    
 async: f
@@ -1269,16 +1269,20 @@
         
+  
+  
 dataType
@@ -1291,16 +1291,20 @@
 'json',%0A
+    
         
@@ -1354,32 +1354,36 @@
                 
+   
+ 
 maskList = respo
@@ -1395,34 +1395,42 @@
                 
-%7D%0A
+    %7D%0A    
             %7D);%0A
@@ -1429,17 +1429,25 @@
     %7D);%0A
-%0A
+    %0A    
         
@@ -1504,16 +1504,20 @@
         
+    
 return m
@@ -1537,18 +1537,40 @@
     
-%7D%0A    %7D%0A%7D);%0A%0A
+    %7D%0A        %7D%0A    %7D);%0A%7D)(jQuery);
 %0A

Update jquery.inputmask.phone.extensions.js