/*!
 * jQuery UI 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&
c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*
 * jQuery UI Effects 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})};
f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=
0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),
d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement;
if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});
return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,
arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/
2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,
d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,
a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,
d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=
0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,
a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
;/*
 * jQuery UI Effects Blind 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Bounce 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Bounce
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Clip 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Drop 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Explode 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Explode
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
;/*
 * jQuery UI Effects Fade 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fade
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Fold 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fold
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Highlight 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Pulsate 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Pulsate
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Scale 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Scale
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Shake 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Shake
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
(h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Slide 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Transfer 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Transfer
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
b.dequeue()})})}})(jQuery);
;

/*Masked Input*/
(function (a) {
    a.inputmask = {
        defaults: {
            placeholder: "_",
            optionalmarker: {
                start: "[",
                end: "]"
            },
            escapeChar: "\\",
            mask: null,
            oncomplete: null,
            oncleared: null,
            repeat: 0,
            greedy: true,
            patch_val: true,
            autoUnmask: false,
            numericInput: false,
            clearMaskOnLostFocus: true,
            insertMode: true,
            clearIncomplete: false,
            definitions: {
                "9": {
                    validator: "[0-9]",
                    cardinality: 1,
                    prevalidator: null
                },
                a: {
                    validator: "[A-Za-z]",
                    cardinality: 1,
                    prevalidator: null
                },
                "*": {
                    validator: "[A-Za-z0-9]",
                    cardinality: 1,
                    prevalidator: null
                },
                d: {
                    validator: "0[1-9]|[12][0-9]|3[01]",
                    cardinality: 2,
                    prevalidator: [{
                        validator: "[0-3]",
                        cardinality: 1
                    }]
                },
                m: {
                    validator: "0[1-9]|1[012]",
                    cardinality: 2,
                    prevalidator: [{
                        validator: "[01]",
                        cardinality: 1
                    }]
                },
                y: {
                    validator: "(19|20)\\d\\d",
                    cardinality: 4,
                    prevalidator: [{
                        validator: "[12]",
                        cardinality: 1
                    }, {
                        validator: "(19|20)",
                        cardinality: 2
                    }, {
                        validator: "(19|20)\\d",
                        cardinality: 3
                    }]
                }
            },
            keyCode: {
                ALT: 18,
                BACKSPACE: 8,
                CAPS_LOCK: 20,
                COMMA: 188,
                COMMAND: 91,
                COMMAND_LEFT: 91,
                COMMAND_RIGHT: 93,
                CONTROL: 17,
                DELETE: 46,
                DOWN: 40,
                END: 35,
                ENTER: 13,
                ESCAPE: 27,
                HOME: 36,
                INSERT: 45,
                LEFT: 37,
                MENU: 93,
                NUMPAD_ADD: 107,
                NUMPAD_DECIMAL: 110,
                NUMPAD_DIVIDE: 111,
                NUMPAD_ENTER: 108,
                NUMPAD_MULTIPLY: 106,
                NUMPAD_SUBTRACT: 109,
                PAGE_DOWN: 34,
                PAGE_UP: 33,
                PERIOD: 190,
                RIGHT: 39,
                SHIFT: 16,
                SPACE: 32,
                TAB: 9,
                UP: 38,
                WINDOWS: 91
            }
        },
        val: a.fn.val
    };
    a.fn.inputmask = function (n, h) {
        var v = a.extend({}, a.inputmask.defaults, h);
        var w = a.browser.msie ? "paste.inputmask" : "input.inputmask";
        var q = (window.orientation != undefined);
        var g = a.inputmask.val;
        if (v.patch_val && a.fn.val.inputmaskpatch != true) {
            a.fn.val = function () {
                if (this.data("inputmask")) {
                    if (this.data("inputmask")["autoUnmask"] && arguments.length == 0) {
                        return this.inputmask("unmaskedvalue")
                    } else {
                        var D = g.apply(this, arguments);
                        if (arguments.length > 0) {
                            this.triggerHandler("setvalue.inputmask")
                        }
                        return D
                    }
                } else {
                    return g.apply(this, arguments)
                }
            };
            a.extend(a.fn.val, {
                inputmaskpatch: true
            })
        }
        if (typeof n == "string") {
            switch (n) {
                case "mask":
                    var c = p();
                    var k = C();
                    return this.each(function () {
                        z(this)
                    });
                    break;
                case "unmaskedvalue":
                    var k = this.data("inputmask")["tests"];
                    var c = this.data("inputmask")["_buffer"];
                    v.greedy = this.data("inputmask")["greedy"];
                    v.repeat = this.data("inputmask")["repeat"];
                    v.definitions = this.data("inputmask")["definitions"];
                    return m(this);
                    break;
                case "setvalue":
                    B(this, h);
                    break;
                case "remove":
                    var k, c;
                    return this.each(function () {
                        var D = a(this);
                        if (D.data("inputmask")) {
                            k = D.data("inputmask")["tests"];
                            c = D.data("inputmask")["_buffer"];
                            v.greedy = D.data("inputmask")["greedy"];
                            v.repeat = D.data("inputmask")["repeat"];
                            v.definitions = D.data("inputmask")["definitions"];
                            g.call(D, m(D, true));
                            D.removeData("inputmask");
                            D.unbind(".inputmask");
                            D.removeClass("focus.inputmask")
                        }
                    });
                    break;
                default:
                    v.mask = n;
                    var c = p();
                    var k = C();
                    return this.each(function () {
                        z(this)
                    });
                    break
            }
        }
        if (typeof n == "object") {
            v = a.extend({}, a.inputmask.defaults, n);
            var c = p();
            var k = C();
            return this.each(function () {
                z(this)
            })
        }

        function p() {
            var G = false;
            if (v.mask.length == 1 && v.greedy == false) {
                v.placeholder = ""
            }
            var D = a.map(v.mask.split(""), function (I, H) {
                var K = [];
                if (I == v.escapeChar) {
                    G = true
                } else {
                    if ((I != v.optionalmarker.start && I != v.optionalmarker.end) || G) {
                        var J = v.definitions[I];
                        if (J && !G) {
                            for (F = 0; F < J.cardinality; F++) {
                                K.push(v.placeholder)
                            }
                        } else {
                            K.push(I);
                            G = false
                        }
                        return K
                    }
                }
            });
            var E = D.slice();
            for (var F = 1; F < v.repeat && v.greedy; F++) {
                E = E.concat(D.slice())
            }
            return E
        }

        function C() {
            var D = false,
				F = false;
            var E = false;
            return a.map(v.mask.split(""), function (I, J) {
                var L = [];
                if (I == v.escapeChar) {
                    F = true
                } else {
                    if (I == v.optionalmarker.start && !F) {
                        D = true;
                        E = true
                    } else {
                        if (I == v.optionalmarker.end && !F) {
                            D = false;
                            E = true
                        } else {
                            var H = v.definitions[I];
                            if (H && !F) {
                                var M = H.prevalidator,
									O = M ? M.length : 0;
                                for (i = 1; i < H.cardinality; i++) {
                                    var N = O >= i ? M[i - 1] : [],
										G = N.validator,
										K = N.cardinality;
                                    L.push({
                                        regex: G ? new RegExp(G) : new RegExp("."),
                                        cardinality: K ? K : 1,
                                        optionality: D,
                                        newBlockMarker: D == true ? E : false,
                                        offset: 0
                                    });
                                    if (D == true) {
                                        E = false
                                    }
                                }
                                L.push({
                                    regex: new RegExp(H.validator),
                                    cardinality: H.cardinality,
                                    optionality: D,
                                    newBlockMarker: E,
                                    offset: 0
                                })
                            } else {
                                L.push({
                                    regex: null,
                                    cardinality: 0,
                                    optionality: D,
                                    newBlockMarker: E,
                                    offset: 0
                                });
                                F = false
                            }
                            E = false;
                            return L
                        }
                    }
                }
            })
        }

        function y(J, I, E) {
            if (J < 0 || J >= x()) {
                return false
            }
            var H = j(J),
				D = I ? 1 : 0,
				G = "";
            for (var F = k[H].cardinality; F > D; F--) {
                G += t(E, H - (F - 1))
            }
            if (I) {
                G += I
            }
            return k[H].regex != null ? k[H].regex.test(G) : false
        }

        function A(F) {
            var D = j(F);
            var E = k[D];
            return E != undefined ? E.regex : false
        }

        function j(D) {
            return D % k.length
        }

        function x() {
            var D = c.length;
            if (!v.greedy && v.repeat > 1) {
                D += (c.length * (v.repeat - 1))
            }
            return D
        }

        function f(E, G) {
            var D = G,
				F = x();
            while (++D < F && !A(D)) { }
            return D
        }

        function e(E, F) {
            var D = F;
            while (--D > 0 && !A(D)) { }
            return D
        }

        function d(E, D, F) {
            r(E, D);
            E[D] = F
        }

        function t(E, D) {
            r(E, D);
            return E[D]
        }

        function r(F, D) {
            while ((F.length <= D || D < 0) && F.length < x()) {
                var G;
                if (v.numericInput) {
                    G = c.length - 1;
                    if (typeof c.length === "number") {
                        while (0 <= G--) {
                            F.unshift(c[G]);
                            D++
                        }
                    } else {
                        while (c[G] !== undefined) {
                            F.unshift(c[G--]);
                            D++
                        }
                    }
                } else {
                    G = 0;
                    if (typeof c.length === "number") {
                        for (var E = c.length; G < E; G++) {
                            F.push(c[G])
                        }
                    } else {
                        while (c[G] !== undefined) {
                            F.push(c[G++])
                        }
                    }
                }
            }
        }

        function u(E, D) {
            return g.call(g.call(E, D.join("")))
        }

        function b(E, H, D) {
            for (var F = H, G = x(); F < D && F < G; F++) {
                d(E, F, t(c.slice(), F))
            }
        }

        function s(D, F) {
            var E = j(F);
            d(D, F, t(c, E))
        }

        function o(Q, I, M) {
            var G = g.call(Q).replace(new RegExp("(" + l(c.join("")) + ")*$"), "");
            b(I, 0, I.length);
            I.length = c.length;
            var K = -1,
				L = -1,
				O = x();
            if (v.numericInput) {
                var E = e(I, O);
                for (var R = 0, D = G.length; R < D; R++) {
                    var N = G.charAt(R);
                    if (y(E, N, I)) {
                        for (var J = 0; J < O; J++) {
                            if (A(J)) {
                                s(I, J);
                                var H = f(I, J);
                                var F = t(I, H);
                                if (F != v.placeholder) {
                                    if (H < x() && y(J, F, I) !== false) {
                                        d(I, J, t(I, H))
                                    } else {
                                        if (A(J)) {
                                            break
                                        }
                                    }
                                }
                            } else {
                                s(I, J)
                            }
                        }
                        d(I, e(I, O), N)
                    }
                }
            } else {
                for (var J = 0, D = G.length; J < D; J++) {
                    for (var P = L + 1; P < O; P++) {
                        if (A(P)) {
                            if (y(P, G.charAt(J), I) !== false) {
                                d(I, P, G.charAt(J));
                                K = L = P
                            } else {
                                s(I, P);
                                if (G.charAt(J) == v.placeholder) {
                                    L = P
                                }
                            }
                            break
                        } else {
                            s(I, P);
                            if (K == L) {
                                K = P
                            }
                            L = P
                        }
                    }
                }
            }
            if (M) {
                u(Q, I)
            }
            return v.numericInput ? O : f(I, K)
        }

        function l(E) {
            var D = ["/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\"];
            return E.replace(new RegExp("(\\" + D.join("|\\") + ")", "gim"), "\\$1")
        }

        function B(D, E) {
            g.call(D, E);
            D.triggerHandler("setvalue.inputmask")
        }

        function m(E, F) {
            if (k && (F === true || !E.hasClass("hasDatepicker"))) {
                var D = c.slice();
                o(E, D);
                return a.map(D, function (H, G) {
                    return A(G) && H != t(c.slice(), G) ? H : null
                }).join("")
            } else {
                return g.call(E)
            }
        }

        function z(E) {
            var L = a(E);
            L.data("inputmask", {
                tests: k,
                _buffer: c,
                greedy: v.greedy,
                repeat: v.repeat,
                autoUnmask: v.autoUnmask,
                definitions: v.definitions
            });
            var H = c.slice();
            var G = g.call(L);
            var J = false;
            var M = -1;
            L.unbind(".inputmask");
            L.removeClass("focus.inputmask");
            if (!L.attr("readonly")) {
                L.bind("mouseenter.inputmask", function () {
                    var O = a(this);
                    if (!O.hasClass("focus.inputmask") && g.call(O).length == 0) {
                        H = c.slice();
                        u(O, H)
                    }
                }).bind("blur.inputmask", function () {
                    var O = a(this);
                    O.removeClass("focus.inputmask");
                    if (g.call(O) != G) {
                        O.change()
                    }
                    if (v.clearMaskOnLostFocus && g.call(O) == c.join("")) {
                        g.call(O, "")
                    }
                    if (v.clearIncomplete && o(O, H, true) != x()) {
                        if (v.clearMaskOnLostFocus) {
                            g.call(O, "")
                        } else {
                            H = c.slice();
                            u(O, H)
                        }
                    }
                }).bind("focus.inputmask", function () {
                    var O = a(this);
                    O.addClass("focus.inputmask");
                    G = g.call(O)
                }).bind("mouseleave.inputmask", function () {
                    var O = a(this);
                    if (v.clearMaskOnLostFocus && !O.hasClass("focus.inputmask") && g.call(O) == c.join("")) {
                        g.call(O, "")
                    }
                }).bind("click.inputmask", function () {
                    var O = a(this);
                    setTimeout(function () {
                        var Q = K(O);
                        if (Q.begin == Q.end) {
                            var P = Q.begin;
                            M = o(O, H, true);
                            K(O, P < M ? P : M)
                        }
                    }, 0)
                }).bind("dblclick.inputmask", function () {
                    var O = a(this);
                    setTimeout(function () {
                        K(O, 0, M)
                    }, 0)
                }).bind("keydown.inputmask", I).bind("keypress.inputmask", N).bind("keyup.inputmask", function (Q) {
                    var P = a(this);
                    var O = Q.keyCode;
                    if (O == v.keyCode.TAB && P.hasClass("focus.inputmask") && g.call(P).length == 0) {
                        H = c.slice();
                        u(P, H);
                        if (!v.numericInput) {
                            K(P, 0)
                        }
                    }
                }).bind(w, function () {
                    var O = a(this);
                    setTimeout(function () {
                        K(O, o(O, H, true))
                    }, 0)
                }).bind("setvalue.inputmask", function () {
                    var O = a(this);
                    setTimeout(function () {
                        G = g.call(O);
                        o(O, H, true);
                        if (g.call(O) == c.join("")) {
                            g.call(O, "")
                        }
                    }, 0)
                })
            }
            setTimeout(function () {
                o(L, H, true);
                if (v.clearMaskOnLostFocus && g.call(L) == c.join("")) {
                    g.call(L, "")
                }
            }, 0);

            function F(T, O, S) {
                while (!A(T) && --T >= 0) { }
                for (var Q = T; Q <= O && Q < x(); Q++) {
                    if (A(Q)) {
                        s(H, Q);
                        var P = f(H, Q);
                        var R = t(H, P);
                        if (R != v.placeholder) {
                            if (P < x() && y(Q, R, H) !== false) {
                                d(H, Q, t(H, P))
                            } else {
                                if (A(Q)) {
                                    break
                                }
                            }
                        } else {
                            if (S == undefined) {
                                break
                            }
                        }
                    } else {
                        s(H, Q)
                    }
                }
                if (S != undefined) {
                    d(H, e(H, O), S)
                }
                H = H.join("").replace(new RegExp("(" + l(c.join("")) + ")*$"), "").split("");
                if (H.length == 0) {
                    H = c.slice()
                }
                u(L, H);
                K(L, v.numericInput ? O : T)
            }

            function D(T, S, R) {
                for (var Q = T; Q < x(); Q++) {
                    if (A(Q)) {
                        var P = t(H, Q);
                        d(H, Q, S);
                        if (P != v.placeholder) {
                            var O = f(H, Q);
                            if (O < x()) {
                                if (y(O, P, H) !== false) {
                                    S = P
                                } else {
                                    if (A(O)) {
                                        break
                                    } else {
                                        S = P
                                    }
                                }
                            } else {
                                break
                            }
                        } else {
                            if (R !== true) {
                                break
                            }
                        }
                    } else {
                        s(H, Q)
                    }
                }
            }

            function K(Q, R, O) {
                if (Q.length == 0) {
                    return
                }
                if (typeof R == "number") {
                    O = (typeof O == "number") ? O : R;
                    if (v.insertMode == false && R == O) {
                        O++
                    }
                    return Q.each(function () {
                        if (this.setSelectionRange) {
                            this.focus();
                            this.setSelectionRange(R, O)
                        } else {
                            if (this.createTextRange) {
                                var S = this.createTextRange();
                                S.collapse(true);
                                S.moveEnd("character", O);
                                S.moveStart("character", R);
                                S.select()
                            }
                        }
                    })
                } else {
                    if (Q[0].setSelectionRange) {
                        R = Q[0].selectionStart;
                        O = Q[0].selectionEnd
                    } else {
                        if (document.selection && document.selection.createRange) {
                            var P = document.selection.createRange();
                            R = 0 - P.duplicate().moveStart("character", -100000);
                            O = R + P.text.length
                        }
                    }
                    return {
                        begin: R,
                        end: O
                    }
                }
            }

            function I(T) {
                var Q = a(this);
                var U = K(Q);
                var P = T.keyCode;
                J = (P < 16 || (P > 16 && P < 32) || (P > 32 && P < 41));
                if ((U.begin - U.end) != 0 && (!J || P == v.keyCode.BACKSPACE || P == v.keyCode.DELETE)) {
                    b(H, U.begin, U.end)
                }
                if (P == v.keyCode.BACKSPACE || P == v.keyCode.DELETE || (q && P == 127)) {
                    var S = x();
                    if (U.begin == 0 && U.end == S) {
                        H = c.slice();
                        u(Q, H);
                        if (!v.numericInput) {
                            K(Q, 0)
                        }
                    } else {
                        if (v.numericInput) {
                            D(0, v.placeholder, true);
                            u(Q, H);
                            K(Q, S)
                        } else {
                            var O = U.begin + (P == v.keyCode.DELETE || U.begin < U.end ? 0 : -1);
                            F(O, S);
                            if (!v.insertMode && P == v.keyCode.BACKSPACE) {
                                K(Q, O > 0 ? O - 1 : O)
                            }
                        }
                    }
                    if (v.oncleared && g.call(Q) == c.join("")) {
                        v.oncleared.call(Q)
                    }
                    return false
                } else {
                    if (P == v.keyCode.END || P == v.keyCode.PAGE_DOWN) {
                        setTimeout(function () {
                            var V = o(Q, H, false);
                            if (!v.insertMode && V == x()) {
                                V--
                            }
                            K(Q, V)
                        }, 0);
                        return false
                    } else {
                        if (P == v.keyCode.ESCAPE) {
                            g.call(Q, G);
                            K(Q, 0, o(Q, H));
                            return false
                        } else {
                            if (P == v.keyCode.INSERT) {
                                v.insertMode = !v.insertMode;
                                K(Q, !v.insertMode && U.begin == x() ? U.begin - 1 : U.begin);
                                return false
                            } else {
                                if (!v.insertMode) {
                                    if (P == v.keyCode.RIGHT) {
                                        var R = U.begin + 1;
                                        K(Q, R < x() ? R : U.begin);
                                        return false
                                    } else {
                                        if (P == v.keyCode.LEFT) {
                                            var R = U.begin - 1;
                                            K(Q, R > 0 ? R : 0);
                                            return false
                                        } else {
                                            if (P == v.keyCode.HOME || P == v.keyCode.PAGE_UP) {
                                                K(Q, 0);
                                                return false
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            function N(S) {
                var P = a(this);
                if (J) {
                    J = false;
                    return (S.keyCode == v.keyCode.BACKSPACE) ? false : null
                }
                S = S || window.event;
                var O = S.charCode || S.keyCode || S.which;
                var U = K(a(this));
                if (S.ctrlKey || S.altKey || S.metaKey) {
                    return true
                } else {
                    if ((O >= 32 && O <= 125) || O > 186) {
                        var T = String.fromCharCode(O);
                        if (v.numericInput) {
                            var R = e(H, U.end);
                            if (y(R, T, H)) {
                                F(0, U.end, T)
                            }
                        } else {
                            var R = f(H, U.begin - 1);
                            if (y(R, T, H)) {
                                if (v.insertMode == true) {
                                    D(R, T)
                                } else {
                                    d(H, R, T)
                                }
                                u(P, H);
                                var Q = f(H, R);
                                K(a(this), Q);
                                if (v.oncomplete && Q == x()) {
                                    v.oncomplete.call(P)
                                }
                            }
                        }
                    }
                }
                return false
            }
        }
    }
})(jQuery);
