From 42a3afeef077d52c69c5dd7a085717fd349797c8 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:27:47 -0300 Subject: [PATCH 01/38] Add the unit tests for a situation when theres no element and you want to get the raw value but it returns the jQuery object --- spec/Raw.Spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/Raw.Spec.js b/spec/Raw.Spec.js index 0516971..794ec9a 100644 --- a/spec/Raw.Spec.js +++ b/spec/Raw.Spec.js @@ -54,4 +54,16 @@ feature("Getting raw value",function(){ expect(input.mask()).toEqual("12"); }); }); + + + scenario("Verify if the input has'nt the mask bound through the raw value", function() { + given("an input without a mask", function() { + input + .mask("9/9-9_9").unmask(); + }); + + then("The raw value should be undefined and no error must occur", function() { + expect(input.mask()).toBe(undefined); + }); + }); }); \ No newline at end of file From 9cbe284a8b7d45e18477689bd61755030484bb14 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:32:26 -0300 Subject: [PATCH 02/38] When theres no element and you want to get the raw value it was returning the jQuery object instead of undefined. --- src/jquery.maskedinput.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index af67604..1c32b3f 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -49,9 +49,14 @@ }, unmask: function() { return this.trigger("unmask"); }, mask: function(mask, settings) { - if (!mask && this.length > 0) { - var input = $(this[0]); - return input.data($.mask.dataName)(); + if (!mask) { + if(this.length > 0) { + var fn = $(this).data($.mask.dataName); + if($.isFunction(fn)) { + return fn(); + }; + } + return undefined; } settings = $.extend({ placeholder: "_", @@ -255,4 +260,4 @@ }); } }); -})(jQuery); +})(jQuery); \ No newline at end of file From c86a54f325291bfd38c4a58723bd8b5bd4022e04 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:38:29 -0300 Subject: [PATCH 03/38] Implements the trigger of change() event on the blur of the mask if the value differs from original value (ir means the value has changed so it has to trigger) Implements afterBlur callback. It triggers after the change(). --- src/jquery.maskedinput.js | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 1c32b3f..ce20db4 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -1,8 +1,17 @@ /* Masked Input plugin for jQuery - Copyright (c) 2007-@Year Josh Bush (digitalbush.com) + Copyright (c) 2007-2011 Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: @version + Version: 1.3 + + [Fagner @ 10/01/2012] Callbacks: + completed - Executa após terminar de preencher a máscara + afterBlur - Executa depois de realizar os procedimentos do blur na máscara + + [Fagner @ 10/01/2012] + Para pegar o valor original do plugin + $("#elemento").mask("9/9").mask(); //Retorna XX sendo cada X o valor do input referente ao nº 9 da máscara + $("#elemento2").mask(); //Retorna undefined */ (function($) { var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; @@ -60,7 +69,8 @@ } settings = $.extend({ placeholder: "_", - completed: null + completed: null, + afterBlur: null }, settings); var defs = $.mask.definitions; @@ -178,6 +188,20 @@ return false; } }; + + function blurEvent(e) { + checkVal(); + + //Se o valor atual do input for diferente do valor original + if (input.val() != focusText) { + input.change(); + } + + //Se estiver setado um callback no afterBlur + if(settings.afterBlur) { + settings.afterBlur.call(input); + } + }; function clearBuffer(start, end) { for (var i = start; i < end && i < len; i++) { @@ -245,11 +269,7 @@ }; ($.browser.msie ? moveCaret:function(){setTimeout(moveCaret,0)})(); }) - .bind("blur.mask", function() { - checkVal(); - if (input.val() != focusText) - input.change(); - }) + .bind("blur.mask", blurEvent) .bind("keydown.mask", keydownEvent) .bind("keypress.mask", keypressEvent) .bind(pasteEventName, function() { From 8d611e67dc8dfa4a0b7537e146e1afa573a128c1 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:41:15 -0300 Subject: [PATCH 04/38] Remove unnecessary comments (ctrl + v) from my local files :D Add comments with examples of the callbacks --- src/jquery.maskedinput.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index ce20db4..b5d4142 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -4,14 +4,9 @@ Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) Version: 1.3 - [Fagner @ 10/01/2012] Callbacks: - completed - Executa após terminar de preencher a máscara - afterBlur - Executa depois de realizar os procedimentos do blur na máscara - - [Fagner @ 10/01/2012] - Para pegar o valor original do plugin - $("#elemento").mask("9/9").mask(); //Retorna XX sendo cada X o valor do input referente ao nº 9 da máscara - $("#elemento2").mask(); //Retorna undefined + Callbacks: + completed - Executes after the mask has been filled + afterBlur - Executes after the value has changed and the blur has occurred */ (function($) { var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; From 5357b73dc09806c2f027bf05a4cf13c79a99bfc8 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:45:01 -0300 Subject: [PATCH 05/38] Update src/jquery.maskedinput.js --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index b5d4142..86466c5 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -1,6 +1,6 @@ /* Masked Input plugin for jQuery - Copyright (c) 2007-2011 Josh Bush (digitalbush.com) + Copyright (c) 2007-@Year Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) Version: 1.3 From 6a5ce86ef23d9fc9472287800c9d0855e7dd539d Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:45:47 -0300 Subject: [PATCH 06/38] Update src/jquery.maskedinput.js --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 86466c5..866ed0e 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -2,7 +2,7 @@ Masked Input plugin for jQuery Copyright (c) 2007-@Year Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: 1.3 + Version: @Version Callbacks: completed - Executes after the mask has been filled From 86eae55fa62c5b441c9a620de6740a1d9c64d12d Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Fri, 16 Mar 2012 09:46:20 -0300 Subject: [PATCH 07/38] Update src/jquery.maskedinput.js --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 866ed0e..0f5d9d3 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -2,7 +2,7 @@ Masked Input plugin for jQuery Copyright (c) 2007-@Year Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: @Version + Version: @version Callbacks: completed - Executes after the mask has been filled From f7e855e4bb1f38fca09f00fa06f743e6a260b588 Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 11:42:39 -0300 Subject: [PATCH 08/38] ?? --- .settings/.jsdtscope | 12 ++++++++++++ .../org.eclipse.wst.jsdt.ui.superType.container | 1 + .settings/org.eclipse.wst.jsdt.ui.superType.name | 1 + spec/Callbacks.Spec.js | 0 4 files changed, 14 insertions(+) create mode 100644 .settings/.jsdtscope create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 spec/Callbacks.Spec.js diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..3c58e91 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/spec/Callbacks.Spec.js b/spec/Callbacks.Spec.js new file mode 100644 index 0000000..e69de29 From 7f18dd849b2cc674fefc1d6e6e0b0346826ec29a Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 11:57:30 -0300 Subject: [PATCH 09/38] Add CallBacks Spec --- spec/Callbacks.Spec.js | 47 ++++++++++++++++++++++++++++++++++++++++++ spec/Raw.Spec.js | 6 ++++++ spec/SpecRunner.html | 1 + 3 files changed, 54 insertions(+) diff --git a/spec/Callbacks.Spec.js b/spec/Callbacks.Spec.js index e69de29..3afdc67 100644 --- a/spec/Callbacks.Spec.js +++ b/spec/Callbacks.Spec.js @@ -0,0 +1,47 @@ +feature("Getting CallBacks",function(){ + scenario("completed", function(){ + var executed = false; + + given("an input with a mask containing a literal", function(){ + input + .mask("9/9", { + completed: function() { + executed = true; + var t = this; + then("'this' from callback must be a jQuery object", function() { + expect(!!t && !!t.jquery && !!t.length).toBe(true); + }); + } + }); + }); + + when("typing all numbers",function(){ + input.mashKeys("12"); + }); + + then("completed callback should fire", function() { + expect(executed).toBe(true); + }); + }); + + scenario("afterBlur", function(){ + var executed = false; + + given("an input with a mask containing a literal", function(){ + input + .mask("9/9", { + afterBlur: function() { + executed = true; + } + }); + }); + + when("typing all numbers",function(){ + input.mashKeys("12").blur(); + }); + + then("completed callback should fire", function() { + expect(executed).toBe(true); + }); + }); +}); \ No newline at end of file diff --git a/spec/Raw.Spec.js b/spec/Raw.Spec.js index 794ec9a..62f33d8 100644 --- a/spec/Raw.Spec.js +++ b/spec/Raw.Spec.js @@ -66,4 +66,10 @@ feature("Getting raw value",function(){ expect(input.mask()).toBe(undefined); }); }); + + scenario("Verify if the input has'nt the mask bound and it doesnt exists (should return undefined)", function() { + then("The raw value should be undefined for an element that does'nt exists", function() { + expect($().mask()).toBe(undefined); + }); + }); }); \ No newline at end of file diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html index 87b3d91..d50da00 100644 --- a/spec/SpecRunner.html +++ b/spec/SpecRunner.html @@ -46,6 +46,7 @@ + From a87234f36145e3f8c82e67f33cac8635fd3a5e80 Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 13:47:16 -0300 Subject: [PATCH 10/38] ui --- newfiletest | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 newfiletest diff --git a/newfiletest b/newfiletest new file mode 100644 index 0000000..e69de29 From 302a840a092c3030fba20f9a3731ca6d31e8f775 Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 13:49:59 -0300 Subject: [PATCH 11/38] fdgfd --- newfiletest | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 newfiletest diff --git a/newfiletest b/newfiletest deleted file mode 100644 index e69de29..0000000 From 9ee00a521fc4b8cc425dbc70ebd8b9feb428de5a Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 14:01:17 -0300 Subject: [PATCH 12/38] ... --- .gitignore | 3 --- .settings/.jsdtscope | 12 ------------ .../org.eclipse.wst.jsdt.ui.superType.container | 1 - .settings/org.eclipse.wst.jsdt.ui.superType.name | 1 - 4 files changed, 17 deletions(-) delete mode 100644 .gitignore delete mode 100644 .settings/.jsdtscope delete mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.name diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 3260eff..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ - -.idea/* -dist/* diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope deleted file mode 100644 index 3c58e91..0000000 --- a/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file From 472a328323ab107e43afb781a4aab9b74190bc38 Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Fri, 16 Mar 2012 18:08:46 -0300 Subject: [PATCH 13/38] Correcting comments :) --- src/jquery.maskedinput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 0f5d9d3..e10384c 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -187,12 +187,12 @@ function blurEvent(e) { checkVal(); - //Se o valor atual do input for diferente do valor original + //if the value differs from original, triggers the change event if (input.val() != focusText) { input.change(); } - //Se estiver setado um callback no afterBlur + //if an afterBlur callback has been defined if(settings.afterBlur) { settings.afterBlur.call(input); } From 5234a4c824433fe0afa6b0a8d66240883f69e85f Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Tue, 20 Mar 2012 11:31:15 -0300 Subject: [PATCH 14/38] Add the unit test simulating the issue #78 https://github.com/digitalBush/jquery.maskedinput/issues/78 --- spec/Setup.Spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/Setup.Spec.js b/spec/Setup.Spec.js index ba765a6..63fa1e4 100644 --- a/spec/Setup.Spec.js +++ b/spec/Setup.Spec.js @@ -14,5 +14,19 @@ feature("Masking an Input", function() { expect(input).toHaveValue('1_'); }); }); + + scenario("Applying a mask to an input with a value", function() { + given('an input with a value', function() { + input.val('55'); + }); + + when("applying a mask with the template in both start and end", function() { + input.mask("(55)"); + }); + + then("value should be correct", function() { + expect(input).toHaveValue('(55)'); + }); + }); }); From 71cd3172d6177abc06247579fc82b09153c2d50a Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Tue, 20 Mar 2012 11:34:49 -0300 Subject: [PATCH 15/38] oops --- spec/Setup.Spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/Setup.Spec.js b/spec/Setup.Spec.js index 63fa1e4..e21eba5 100644 --- a/spec/Setup.Spec.js +++ b/spec/Setup.Spec.js @@ -21,7 +21,7 @@ feature("Masking an Input", function() { }); when("applying a mask with the template in both start and end", function() { - input.mask("(55)"); + input.mask("(99)"); }); then("value should be correct", function() { From b0632fee0fcd44084ec46aac48a57630eba057cc Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Tue, 20 Mar 2012 12:01:55 -0300 Subject: [PATCH 16/38] Changing spec for a more accurate test --- spec/Setup.Spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/Setup.Spec.js b/spec/Setup.Spec.js index e21eba5..823481c 100644 --- a/spec/Setup.Spec.js +++ b/spec/Setup.Spec.js @@ -21,11 +21,11 @@ feature("Masking an Input", function() { }); when("applying a mask with the template in both start and end", function() { - input.mask("(99)"); + input.mask("(((99)))"); }); then("value should be correct", function() { - expect(input).toHaveValue('(55)'); + expect(input).toHaveValue('(((55)))'); }); }); }); From f527c32d7e555658440b8b910d0996835186092f Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Tue, 20 Mar 2012 13:53:56 -0300 Subject: [PATCH 17/38] Fix bug #74 (Bug on mask template when it is the last char) --- spec/Setup.Spec.js | 1 + src/jquery.maskedinput.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/spec/Setup.Spec.js b/spec/Setup.Spec.js index 823481c..07f6fba 100644 --- a/spec/Setup.Spec.js +++ b/spec/Setup.Spec.js @@ -15,6 +15,7 @@ feature("Masking an Input", function() { }); }); + //Issue #74 scenario("Applying a mask to an input with a value", function() { given('an input with a value', function() { input.val('55'); diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index e10384c..cc07915 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -227,6 +227,11 @@ } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { pos++; lastMatch = i; + } else { + //Issue #74 + //Increase the lastMatch each time it reaches a template char + //so writeBuffer() will be called if there's template chars in the end of the mask + lastMatch++; } } if (!allow && lastMatch + 1 < partialPosition) { From 315e51fcc98a43b1156aa8ab8f8557c4f988fa0d Mon Sep 17 00:00:00 2001 From: Fagner Martins Brack Date: Tue, 3 Apr 2012 16:03:30 -0300 Subject: [PATCH 18/38] It actually fixed the issue #78, not #74 --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index cc07915..769c13e 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -228,7 +228,7 @@ pos++; lastMatch = i; } else { - //Issue #74 + //Issue #78 //Increase the lastMatch each time it reaches a template char //so writeBuffer() will be called if there's template chars in the end of the mask lastMatch++; From ce7c946bd693a068b09f1d315874aed210a87136 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Mon, 23 Apr 2012 10:15:34 -0300 Subject: [PATCH 19/38] Correcting the bug of the white-space and removind the comments (The unit tests talks for itself) --- spec/Raw.Spec.js | 14 ++++++++++++++ src/jquery.maskedinput.js | 18 ++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/spec/Raw.Spec.js b/spec/Raw.Spec.js index 62f33d8..db2c2a8 100644 --- a/spec/Raw.Spec.js +++ b/spec/Raw.Spec.js @@ -72,4 +72,18 @@ feature("Getting raw value",function(){ expect($().mask()).toBe(undefined); }); }); + + scenario("If an optional condition is followed by white-space it should not keep that value", function() { + given("an input with an optional mask followed by a white-space", function() { + input.mask("999? 99"); + }); + + when("typing without the space and bluring", function() { + input.mashKeys("123").trigger("blur") + }); + + then("The input.val() should not contain the space", function() { + expect(input.val()).toBe("123"); + }); + }); }); \ No newline at end of file diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 769c13e..f7a166b 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -209,8 +209,7 @@ function checkVal(allow) { //try to place characters where they belong - var test = input.val(); - var lastMatch = -1; + var test = input.val(), lastMatch = -1; for (var i = 0, pos = 0; i < len; i++) { if (tests[i]) { buffer[i] = settings.placeholder; @@ -224,14 +223,13 @@ } if (pos > test.length) break; - } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { - pos++; - lastMatch = i; - } else { - //Issue #78 - //Increase the lastMatch each time it reaches a template char - //so writeBuffer() will be called if there's template chars in the end of the mask - lastMatch++; + } else if (i!=partialPosition) { + if(buffer[i] == test.charAt(pos)) { + pos++; + lastMatch = i; + } else { + lastMatch++; + } } } if (!allow && lastMatch + 1 < partialPosition) { From 00754a42badba423afdeae8aaaaf2e0074ba3b99 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Mon, 14 May 2012 10:15:18 -0300 Subject: [PATCH 20/38] Update to jQuery 1.7 Add autoMask to set mask in any element with the data-mask attribute within the selector using .on() --- lib/jquery-1.4.4.min.js | 167 -------------------------------------- lib/jquery-1.7.min.js | 4 + spec/AutoMask.Spec.js | 42 ++++++++++ spec/SpecRunner.html | 3 +- src/jquery.maskedinput.js | 11 +++ 5 files changed, 59 insertions(+), 168 deletions(-) delete mode 100644 lib/jquery-1.4.4.min.js create mode 100644 lib/jquery-1.7.min.js create mode 100644 spec/AutoMask.Spec.js diff --git a/lib/jquery-1.4.4.min.js b/lib/jquery-1.4.4.min.js deleted file mode 100644 index 8f3ca2e..0000000 --- a/lib/jquery-1.4.4.min.js +++ /dev/null @@ -1,167 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.4 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Nov 11 19:04:53 2010 -0500 - */ -(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= -h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, -"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, -e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, -"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ -a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, -C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, -s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, -j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, -toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== --1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; -if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", -b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& -!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& -l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), -k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, -scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= -false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= -1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
t
";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= -"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= -c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); -else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; -if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, -attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& -b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; -c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, -arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= -d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ -c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== -8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== -"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ -d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= -B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== -"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== -0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); -(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; -break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, -q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= -l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, -m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== -true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== -g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- -0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== -i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; -if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, -g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); -n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& -function(){var g=k,i=t.createElement("div");i.innerHTML="

";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| -p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= -t.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? -function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= -h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): -c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, -2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, -b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& -e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, -""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; -else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", -prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| -b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- -1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); -d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, -jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, -zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), -h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); -if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= -d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; -e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, -ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== -"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& -!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, -getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", -script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| -!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= -false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; -A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", -b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& -c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| -c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= -encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", -[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), -e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); -if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", -3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, -d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* -Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} -var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; -this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| -this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= -c.timers,b=0;b
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="
"+""+"
";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&& +(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after" +,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js new file mode 100644 index 0000000..d7ba912 --- /dev/null +++ b/spec/AutoMask.Spec.js @@ -0,0 +1,42 @@ +var container; +feature("AutoMask", function() { + beforeEach(function() { + container = $("
").appendTo("body"); + }); + + scenario("Valid container", function() { + var $cont = $("#auto-mask-container"); + var $input = $cont.find("input"); + + given("an autoMask", function() { + $cont.autoMask(); + }); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("The mask should be correct", function() { + expect($input).toHaveValue("1/2"); + }); + + }); + + scenario("Invalid container", function() { + var $cont = $("#no-auto-mask"); + var $input = $cont.find("input"); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("The mask should be correct", function() { + expect($input).toHaveValue("12"); + }); + }); + + afterEach(function() { + container.remove(); + container = undefined; + }); +}); \ No newline at end of file diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html index d50da00..608db8e 100644 --- a/spec/SpecRunner.html +++ b/spec/SpecRunner.html @@ -34,7 +34,7 @@ - + @@ -47,6 +47,7 @@ + diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index f7a166b..8d9736b 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -276,6 +276,17 @@ checkVal(); //Perform initial check for existing values }); + }, + + //jQuery 1.7+ + autoMask: function() { + return $(this).on("focus", "input:text[data-mask]", function(e) { + var $this = $(this); + var mask = $this.data("mask"); + if(mask !== undefined && $this.mask() === undefined) { + $this.mask(mask); + } + }); } }); })(jQuery); \ No newline at end of file From 49e290bdbd0e0cf43d95c7bc11afc4feb2179c48 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Thu, 14 Jun 2012 11:58:37 -0300 Subject: [PATCH 21/38] Add default mask definition "A" --- src/jquery.maskedinput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 8d9736b..b19c33f 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -17,6 +17,7 @@ definitions: { '9': "[0-9]", 'a': "[A-Za-z]", + 'A': "[A-Z]", '*': "[A-Za-z0-9]" }, dataName:"rawMaskFn" From 05f823dd0f83862674220ab4b11ba3279a3b1b32 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Sun, 17 Jun 2012 01:16:05 -0300 Subject: [PATCH 22/38] Readme for autoMask --- README.md | 15 ++++++++++++++- src/jquery.maskedinput.js | 10 +++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 64828ed..b5979dd 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,17 @@ This is a masked input plugin for the jQuery javascript library. It allows a use * a - Represents an alpha character (A-Z,a-z) * 9 - Represents a numeric character (0-9) -* \* - Represents an alphanumeric character (A-Z,a-z,0-9) \ No newline at end of file +* \* - Represents an alphanumeric character (A-Z,a-z,0-9) + +autoMask (jQuery 1.7+) +-------- +By calling $(selector).automask() once it reads the data-mask attribute and automatically set the specified mask to any input:text element inside the selector. +Example: +
+$(function() {
+	$(document).automask();
+});
+
+
+
+
\ No newline at end of file diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 8d9736b..bd84c49 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -278,13 +278,13 @@ }); }, - //jQuery 1.7+ autoMask: function() { return $(this).on("focus", "input:text[data-mask]", function(e) { - var $this = $(this); - var mask = $this.data("mask"); - if(mask !== undefined && $this.mask() === undefined) { - $this.mask(mask); + var $input = $(this), + dataMask = $input.data("mask"); + + if( dataMask !== undefined && $input.mask() === undefined ) { + $input.mask(dataMask); } }); } From cf1b36fb0018d0c01d79f9049d3168aad56e4268 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Sun, 17 Jun 2012 01:24:20 -0300 Subject: [PATCH 23/38] Oops, escaping... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5979dd..0307eb6 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,5 @@ $(function() { }); - +<input type="text" data-mask="99/99/9999" /> \ No newline at end of file From 4083158ebf15a3e9bafed5d2d8fcc1d3a4ad6a08 Mon Sep 17 00:00:00 2001 From: Fagner Martins Date: Sun, 17 Jun 2012 01:25:49 -0300 Subject: [PATCH 24/38] escaping v2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0307eb6..dc89d4b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ $(function() { $(document).automask(); }); - +//The mask will be 99/99/9999 <input type="text" data-mask="99/99/9999" /> \ No newline at end of file From d04be6dad69253526989f9185802f0eca52ff45c Mon Sep 17 00:00:00 2001 From: Ivan Gromov Date: Mon, 2 Jul 2012 00:10:00 +0400 Subject: [PATCH 25/38] fixed typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc89d4b..92ba6af 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ By calling $(selector).automask() once it reads the data-mask attribute and auto Example:
 $(function() {
-	$(document).automask();
+	$(document).autoMask();
 });
 
 //The mask will be 99/99/9999

From 9123c66ac331b9b67e68b68c788f92f6f1ce4014 Mon Sep 17 00:00:00 2001
From: Fagner Martins 
Date: Mon, 2 Jul 2012 08:58:07 -0300
Subject: [PATCH 26/38] Other typo

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 92ba6af..b414511 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ This is a masked input plugin for the jQuery javascript library. It allows a use
 
 autoMask (jQuery 1.7+)
 --------
-By calling $(selector).automask() once it reads the data-mask attribute and automatically set the specified mask to any input:text element inside the selector.  
+By calling $(selector).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input:text element inside the selector.  
 Example:
 
 $(function() {

From d5b0292dcb54b17f97b23954bf6c5a173301b9f3 Mon Sep 17 00:00:00 2001
From: Fagner Brack 
Date: Mon, 2 Jul 2012 16:08:04 -0300
Subject: [PATCH 27/38] FF Component returned failure code: 0x80004005 Fix the
 error "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
 [nsIDOMHTMLInputElement.setSelectionRange]" when programatically focusing in
 a hidden element

---
 spec/Focus.Spec.js        | 12 +++++++++++-
 src/jquery.maskedinput.js |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/spec/Focus.Spec.js b/spec/Focus.Spec.js
index c59645f..e9cac4b 100644
--- a/spec/Focus.Spec.js
+++ b/spec/Focus.Spec.js
@@ -16,7 +16,17 @@ feature("Focusing A Masked Input",function(){
 			expect(caret.end).toEqual(0);
 		});
 	});
-
+	
+	//Could not test this properly since jquery uses $.error() to throw this exception
+	scenario("Error: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLInputElement.setSelectionRange]",function(){
+		given("a mask in a hidden input",function(){
+			input.hide().mask("9");
+		});
+		when("focusing no error should occur in the console",function(){
+			input.focus();
+		});
+	});
+	
 	scenario("Mask starts with a literal",function(){
 		given("a mask beginning with a literal",function(){
 			input.mask("(9)");
diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js
index 6b2dbf2..b4ea2d1 100644
--- a/src/jquery.maskedinput.js
+++ b/src/jquery.maskedinput.js
@@ -27,6 +27,7 @@
 		//Helper Function for Caret positioning
 		caret: function(begin, end) {
 			if (this.length == 0) return;
+			if (this.is(":hidden")) return; //setSelectionRange fails if the element is hidden
 			if (typeof begin == 'number') {
 				end = (typeof end == 'number') ? end : begin;
 				return this.each(function() {

From 8e5abadf7371968980dc8e9f5ffed327275965a0 Mon Sep 17 00:00:00 2001
From: Fagner Brack 
Date: Mon, 9 Jul 2012 14:06:23 -0300
Subject: [PATCH 28/38] Fix data-mask="99" not setting properly

---
 spec/AutoMask.Spec.js     | 26 +++++++++++++++++++++-----
 src/jquery.maskedinput.js |  2 +-
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js
index d7ba912..3d27a8a 100644
--- a/spec/AutoMask.Spec.js
+++ b/spec/AutoMask.Spec.js
@@ -1,12 +1,13 @@
-var container;
+var container, container2;
 feature("AutoMask", function() {
 	beforeEach(function() {
 		container = $("
").appendTo("body"); + container = $("
").appendTo("body"); }); scenario("Valid container", function() { - var $cont = $("#auto-mask-container"); - var $input = $cont.find("input"); + var $cont = $("#auto-mask-container"), + $input = $cont.find("input"); given("an autoMask", function() { $cont.autoMask(); @@ -23,8 +24,8 @@ feature("AutoMask", function() { }); scenario("Invalid container", function() { - var $cont = $("#no-auto-mask"); - var $input = $cont.find("input"); + var $cont = $("#no-auto-mask"), + $input = $cont.find("input"); when("typing and bluring", function() { $input.focus().mashKeys("12").blur(); @@ -35,6 +36,21 @@ feature("AutoMask", function() { }); }); + scenario("When reading data should treat as string",function(){ + var $cont = $("#auto-mask-container2"), + $input = $cont.find("input"); + + given("an autoMask",function(){ + $cont.autoMask(); + }); + when("focusing",function(){ + $input.focus().mashKeys("99"); + }); + then("the mask should be correct",function(){ + expect($input.mask()).toBe('99'); + }); + }); + afterEach(function() { container.remove(); container = undefined; diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index b4ea2d1..5167310 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -286,7 +286,7 @@ dataMask = $input.data("mask"); if( dataMask !== undefined && $input.mask() === undefined ) { - $input.mask(dataMask); + $input.mask( String(dataMask) ); } }); } From e8f99c075f2efb1817478ffc9d1c23c2bc9973eb Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Tue, 28 Aug 2012 10:35:31 -0300 Subject: [PATCH 29/38] Add IIFE to avoid globals --- spec/AutoMask.Spec.js | 98 ++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js index 3d27a8a..8c2cc0d 100644 --- a/spec/AutoMask.Spec.js +++ b/spec/AutoMask.Spec.js @@ -1,58 +1,60 @@ -var container, container2; -feature("AutoMask", function() { - beforeEach(function() { - container = $("
").appendTo("body"); - container = $("
").appendTo("body"); - }); - - scenario("Valid container", function() { - var $cont = $("#auto-mask-container"), - $input = $cont.find("input"); - - given("an autoMask", function() { - $cont.autoMask(); +(function() { + var container, container2; + feature("AutoMask", function() { + beforeEach(function() { + container = $("
").appendTo("body"); + container = $("
").appendTo("body"); }); - when("typing and bluring", function() { - $input.focus().mashKeys("12").blur(); + scenario("Valid container", function() { + var $cont = $("#auto-mask-container"), + $input = $cont.find("input"); + + given("an autoMask", function() { + $cont.autoMask(); + }); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("The mask should be correct", function() { + expect($input).toHaveValue("1/2"); + }); + }); - then("The mask should be correct", function() { - expect($input).toHaveValue("1/2"); - }); - - }); - - scenario("Invalid container", function() { - var $cont = $("#no-auto-mask"), - $input = $cont.find("input"); - - when("typing and bluring", function() { - $input.focus().mashKeys("12").blur(); + scenario("Invalid container", function() { + var $cont = $("#no-auto-mask"), + $input = $cont.find("input"); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("The mask should be correct", function() { + expect($input).toHaveValue("12"); + }); }); - then("The mask should be correct", function() { - expect($input).toHaveValue("12"); + scenario("When reading data should treat as string",function(){ + var $cont = $("#auto-mask-container2"), + $input = $cont.find("input"); + + given("an autoMask",function(){ + $cont.autoMask(); + }); + when("focusing",function(){ + $input.focus().mashKeys("99"); + }); + then("the mask should be correct",function(){ + expect($input.mask()).toBe('99'); + }); }); - }); - - scenario("When reading data should treat as string",function(){ - var $cont = $("#auto-mask-container2"), - $input = $cont.find("input"); - given("an autoMask",function(){ - $cont.autoMask(); - }); - when("focusing",function(){ - $input.focus().mashKeys("99"); + afterEach(function() { + container.remove(); + container = undefined; }); - then("the mask should be correct",function(){ - expect($input.mask()).toBe('99'); - }); - }); - - afterEach(function() { - container.remove(); - container = undefined; }); -}); \ No newline at end of file +})(); \ No newline at end of file From 59b81d2340e1009f0781db75c280b80de43ab062 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Tue, 28 Aug 2012 10:48:57 -0300 Subject: [PATCH 30/38] Passing options --- README.md | 16 ++++++++++++++- spec/AutoMask.Spec.js | 41 +++++++++++++++++++++++++++++++-------- src/jquery.maskedinput.js | 4 ++-- 3 files changed, 50 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b414511..d48b154 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,18 @@ $(function() { //The mask will be 99/99/9999 <input type="text" data-mask="99/99/9999" /> -
\ No newline at end of file +
+ +You could also pass the options in the first argument. These options will be defined once and be valid to all the masks inside the selector. +Example: +
+$(function() {
+	$(document).autoMask({
+		completed: function() {
+			alert("Alert executed after each mask has been completed");
+		}
+	});
+});
+
+ +autoMask does NOT support two or more instance in the same selector or in any of it's contents. \ No newline at end of file diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js index 8c2cc0d..40a4d54 100644 --- a/spec/AutoMask.Spec.js +++ b/spec/AutoMask.Spec.js @@ -2,8 +2,8 @@ var container, container2; feature("AutoMask", function() { beforeEach(function() { - container = $("
").appendTo("body"); - container = $("
").appendTo("body"); + container1 = $("
").appendTo("body"); + container2 = $("
").appendTo("body"); }); scenario("Valid container", function() { @@ -37,24 +37,49 @@ }); }); - scenario("When reading data should treat as string",function(){ + scenario("When reading data should treat as string", function(){ var $cont = $("#auto-mask-container2"), $input = $cont.find("input"); - given("an autoMask",function(){ + given("an autoMask", function(){ $cont.autoMask(); }); - when("focusing",function(){ + when("focusing", function(){ $input.focus().mashKeys("99"); }); - then("the mask should be correct",function(){ + then("the mask should be correct", function(){ expect($input.mask()).toBe('99'); }); }); + scenario("When starting should be able to pass custom options for all the masks", function() { + var $cont = $("#auto-mask-container"), + $input = $cont.find("input"), + count = 0; + + given("an autoMask with options", function() { + $cont.autoMask({ + completed: function() { + count++; + } + }); + }); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("the completed callback should fire once", function() { + expect(count).toBe(1); + }); + + }); + afterEach(function() { - container.remove(); - container = undefined; + container1.remove(); + container2.remove(); + container1 = undefined; + container2.remove(); }); }); })(); \ No newline at end of file diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 5167310..6483bc6 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -280,13 +280,13 @@ }); }, - autoMask: function() { + autoMask: function( options ) { return $(this).on("focus", "input:text[data-mask]", function(e) { var $input = $(this), dataMask = $input.data("mask"); if( dataMask !== undefined && $input.mask() === undefined ) { - $input.mask( String(dataMask) ); + $input.mask( String(dataMask), options ); } }); } From 15d38193500286552b9325ba182a0e294c6bd12d Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Tue, 28 Aug 2012 11:32:21 -0300 Subject: [PATCH 31/38] The callback options from autoMask should behave exactly as the regular mask --- spec/AutoMask.Spec.js | 26 ++++++++++++++++++++++++++ src/jquery.maskedinput.js | 13 ++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js index 40a4d54..4c79311 100644 --- a/spec/AutoMask.Spec.js +++ b/spec/AutoMask.Spec.js @@ -75,6 +75,32 @@ }); + scenario("The callback options from autoMask should behave exactly as the regular mask", function() { + var input1, input2, + $cont = $("#auto-mask-container"), + $input = $cont.find("input"); + + given("an autoMask with callbacks", function() { + $cont.autoMask({ + completed: function() { + input1 = this; + }, + afterBlur: function() { + input2 = this; + } + }); + }); + + when("typing and bluring", function() { + $input.focus().mashKeys("12").blur(); + }); + + then("this should be correct", function() { + expect(input1[0]).toBe($input[0]); + expect(input2[0]).toBe($input[0]); + }); + }) + afterEach(function() { container1.remove(); container2.remove(); diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 6483bc6..c049c1f 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -282,9 +282,20 @@ autoMask: function( options ) { return $(this).on("focus", "input:text[data-mask]", function(e) { - var $input = $(this), + var completed, afterBlur, + $input = $(this), dataMask = $input.data("mask"); + if( options ) { + (completed = options.completed) && (options.completed = function() { + completed.call( $input ); + }); + + (afterBlur = options.afterBlur) && (options.afterBlur = function() { + afterBlur.call( $input ); + }); + } + if( dataMask !== undefined && $input.mask() === undefined ) { $input.mask( String(dataMask), options ); } From 582d183d141668ee6edfc6379be580a99898dcc1 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Fri, 19 Oct 2012 10:33:15 -0300 Subject: [PATCH 32/38] Aditional test: The callback options from autoMask should behave exactly as the regular mask --- src/jquery.maskedinput.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index c049c1f..6483bc6 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -282,20 +282,9 @@ autoMask: function( options ) { return $(this).on("focus", "input:text[data-mask]", function(e) { - var completed, afterBlur, - $input = $(this), + var $input = $(this), dataMask = $input.data("mask"); - if( options ) { - (completed = options.completed) && (options.completed = function() { - completed.call( $input ); - }); - - (afterBlur = options.afterBlur) && (options.afterBlur = function() { - afterBlur.call( $input ); - }); - } - if( dataMask !== undefined && $input.mask() === undefined ) { $input.mask( String(dataMask), options ); } From d5588254a5a455f4926ef972a72a7d9958faa57e Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Fri, 19 Oct 2012 11:17:46 -0300 Subject: [PATCH 33/38] Handling input[type='tel'] and input[type='number'] --- README.md | 12 +++++++++--- spec/AutoMask.Spec.js | 27 ++++++++++++++++++++++----- src/jquery.maskedinput.js | 7 ++++++- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d48b154..eca8633 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,28 @@ This is a masked input plugin for the jQuery javascript library. It allows a use autoMask (jQuery 1.7+) -------- -By calling $(selector).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input:text element inside the selector. +By calling $( selector ).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input[type='text'], input[type='tel'] or input[type='number'] element inside the selector. Example:
 $(function() {
-	$(document).autoMask();
+	$( document ).autoMask();
 });
 
 //The mask will be 99/99/9999
 <input type="text" data-mask="99/99/9999" />
+
+//The mask will be +99 9999
+<input type="tel" data-mask="+99 9999" />
+
+//The mask will be 99 - 99
+<input type="number" data-mask="99 - 99" />
 
You could also pass the options in the first argument. These options will be defined once and be valid to all the masks inside the selector. Example:
 $(function() {
-	$(document).autoMask({
+	$( document ).autoMask({
 		completed: function() {
 			alert("Alert executed after each mask has been completed");
 		}
diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js
index 4c79311..18524fb 100644
--- a/spec/AutoMask.Spec.js
+++ b/spec/AutoMask.Spec.js
@@ -1,9 +1,10 @@
-(function() {
-	var container, container2;
+(function( $ ) {
+	var container, container2, oldJqueryOn;
 	feature("AutoMask", function() {
 		beforeEach(function() {
 			container1 = $("
").appendTo("body"); container2 = $("
").appendTo("body"); + oldJqueryOn = $.fn.on; }); scenario("Valid container", function() { @@ -95,17 +96,33 @@ $input.focus().mashKeys("12").blur(); }); - then("this should be correct", function() { + then("'this' should be correct", function() { expect(input1[0]).toBe($input[0]); expect(input2[0]).toBe($input[0]); }); - }) + }); + + scenario("Inputs to be handled", function() { + + $.fn.on = function( eventType, selector ) { + then("should handle the inputs type='text', type='tel' and type='number'", function() { + expect( selector ).toBe("input[type='text'][data-mask], input[type='tel'][data-mask], input[type='number'][data-mask]"); + }); + }; + + when("calling an autoMask", function() { + $("#auto-mask-container").autoMask(); + }); + + }); afterEach(function() { container1.remove(); container2.remove(); container1 = undefined; container2.remove(); + + $.fn.on = oldJqueryOn; }); }); -})(); \ No newline at end of file +})( jQuery ); \ No newline at end of file diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 6483bc6..62258a8 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -281,7 +281,12 @@ }, autoMask: function( options ) { - return $(this).on("focus", "input:text[data-mask]", function(e) { + + function selector( type ) { + return "input[type='" + type + "'][data-mask]"; + } + + return $(this).on("focus", [ selector("text"), selector("tel"), selector("number") ].join(", "), function(e) { var $input = $(this), dataMask = $input.data("mask"); From 044a3d32e4ad5608b1b73c6a53dbbcf6d8088a88 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Fri, 19 Oct 2012 11:51:51 -0300 Subject: [PATCH 34/38] Should set the mask for elements with value that already exists in the page --- README.md | 1 + spec/AutoMask.Spec.js | 36 +++++++++++++++++++++++++++++++----- src/jquery.maskedinput.js | 12 +++++++++--- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index eca8633..ee292f6 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This is a masked input plugin for the jQuery javascript library. It allows a use autoMask (jQuery 1.7+) -------- By calling $( selector ).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input[type='text'], input[type='tel'] or input[type='number'] element inside the selector. +By adding new elements with a data-mask attribute and without value autoMask will bind the mask behavior to that element. Example:
 $(function() {
diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js
index 18524fb..a44f80b 100644
--- a/spec/AutoMask.Spec.js
+++ b/spec/AutoMask.Spec.js
@@ -1,10 +1,17 @@
 (function( $ ) {
-	var container, container2, oldJqueryOn;
+	
+	var container, //one with mask and one without
+		container2, //one with mask
+		container3, //one with mask and value
+		oldJqueryOn, oldMask;
+	
 	feature("AutoMask", function() {
 		beforeEach(function() {
-			container1 = $("
").appendTo("body"); - container2 = $("
").appendTo("body"); + container1 = $("
").appendTo( document.body ); + container2 = $("
").appendTo( document.body ); + container3 = $("
").appendTo( document.body ); oldJqueryOn = $.fn.on; + oldMask = $.fn.mask; }); scenario("Valid container", function() { @@ -110,19 +117,38 @@ }); }; + $.fn.mask = function() {}; + when("calling an autoMask", function() { $("#auto-mask-container").autoMask(); }); }); + scenario("If an input exists", function() { + + var $cont = $("#auto-mask-container3"); + var $input = $cont.find("input"); + + when("calling an autoMask", function() { + $cont.autoMask(); + }); + + then("any input with value and data-mask should be masked", function() { + expect( $input.val() ).toBe("9/9"); + }); + + }); + afterEach(function() { container1.remove(); container2.remove(); - container1 = undefined; - container2.remove(); + container3.remove(); + + container1 = container2 = container3 = undefined; $.fn.on = oldJqueryOn; + $.fn.mask = oldMask; }); }); })( jQuery ); \ No newline at end of file diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 62258a8..564ee90 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -282,18 +282,24 @@ autoMask: function( options ) { - function selector( type ) { + var selector = [ getSelector("text"), getSelector("tel"), getSelector("number") ].join(", "); + var $context = $( this ); + + function getSelector( type ) { return "input[type='" + type + "'][data-mask]"; } - return $(this).on("focus", [ selector("text"), selector("tel"), selector("number") ].join(", "), function(e) { + function maskIt() { var $input = $(this), dataMask = $input.data("mask"); if( dataMask !== undefined && $input.mask() === undefined ) { $input.mask( String(dataMask), options ); } - }); + } + + $context.find( selector ).each( maskIt ); + return $context.on("focus", selector, maskIt); } }); })(jQuery); From 10697d448de438edeefafee7c662b8914f42f018 Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Fri, 19 Oct 2012 12:22:56 -0300 Subject: [PATCH 35/38] clear previous mask event upon execution --- spec/AutoMask.Spec.js | 38 +++++++++++++++++++++++++++++++++++++- src/jquery.maskedinput.js | 3 ++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/spec/AutoMask.Spec.js b/spec/AutoMask.Spec.js index a44f80b..054a7b7 100644 --- a/spec/AutoMask.Spec.js +++ b/spec/AutoMask.Spec.js @@ -3,7 +3,7 @@ var container, //one with mask and one without container2, //one with mask container3, //one with mask and value - oldJqueryOn, oldMask; + oldJqueryOn, oldJQueryOff, oldMask; feature("AutoMask", function() { beforeEach(function() { @@ -11,6 +11,7 @@ container2 = $("
").appendTo( document.body ); container3 = $("
").appendTo( document.body ); oldJqueryOn = $.fn.on; + oldJQueryOff = $.fn.off; oldMask = $.fn.mask; }); @@ -140,6 +141,40 @@ }); + scenario("autoMask being called twice", function() { + + var $cont = $("#auto-mask-container3"); + var countOn = 0; + var countOff = 0; + + $.fn.on = function( eventType, selector ) { + if ( eventType === "focus.automask" ) { + countOn++; + } + }; + + $.fn.off = function( eventType, selector ) { + if ( eventType === "focus.automask" ) { + countOff++; + } + }; + + $.fn.mask = function() {}; + + when("calling autoMask", function() { + $cont.autoMask(); + }); + + then("on should be called once", function() { + expect( countOn++ ).toBe( 1 ); + }); + + then("off should be called once", function() { + expect( countOff++ ).toBe( 1 ); + }); + + }); + afterEach(function() { container1.remove(); container2.remove(); @@ -148,6 +183,7 @@ container1 = container2 = container3 = undefined; $.fn.on = oldJqueryOn; + $.fn.off = oldJQueryOff; $.fn.mask = oldMask; }); }); diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 564ee90..a97fac5 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -299,7 +299,8 @@ } $context.find( selector ).each( maskIt ); - return $context.on("focus", selector, maskIt); + $context.off("focus.automask"); + return $context.on("focus.automask", selector, maskIt); } }); })(jQuery); From fe1debce5a208e96ebe1021c734827991861434c Mon Sep 17 00:00:00 2001 From: Fagner Brack Date: Fri, 19 Oct 2012 12:24:13 -0300 Subject: [PATCH 36/38] line break --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee292f6..e05d010 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ autoMask (jQuery 1.7+) -------- By calling $( selector ).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input[type='text'], input[type='tel'] or input[type='number'] element inside the selector. By adding new elements with a data-mask attribute and without value autoMask will bind the mask behavior to that element. -Example: +Example:
 $(function() {
 	$( document ).autoMask();

From 047b95c9bee9410c5c02c0f6876be3ead29278d9 Mon Sep 17 00:00:00 2001
From: Fagner Brack 
Date: Fri, 19 Oct 2012 12:25:10 -0300
Subject: [PATCH 37/38] Wrong line...

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index e05d010..9c0919c 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@ This is a masked input plugin for the jQuery javascript library. It allows a use
 autoMask (jQuery 1.7+)
 --------
 By calling $( selector ).autoMask() once it reads the data-mask attribute and automatically set the specified mask to any input[type='text'], input[type='tel'] or input[type='number'] element inside the selector.  
-By adding new elements with a data-mask attribute and without value autoMask will bind the mask behavior to that element.
-Example:  
+By adding new elements with a data-mask attribute and without value autoMask will bind the mask behavior to that element.  
+Example:
 
 $(function() {
 	$( document ).autoMask();

From 643de96a4a17c0c2ea3ef5ea939ae625acd5e704 Mon Sep 17 00:00:00 2001
From: Oleg Lobach 
Date: Wed, 5 Dec 2012 23:53:38 +0400
Subject: [PATCH 38/38] Fixed link to old version of jQuery lib on demo pages

---
 demo/datepicker.html | 2 +-
 demo/index.html      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/demo/datepicker.html b/demo/datepicker.html
index 0b7ce77..39d4817 100644
--- a/demo/datepicker.html
+++ b/demo/datepicker.html
@@ -1,7 +1,7 @@
 
 
  datepicker demo 
-
+
 
 
 	
diff --git a/demo/index.html b/demo/index.html
index c371c75..8197061 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -1,7 +1,7 @@
 
 
  jQuery Mask Test 
-
+
 
 
     $(function() {