/* * jQuery Cookie Plugin v1.3 * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ (function($,document,undefined){var pluses=/\+/g;function raw(s){return s;} function decoded(s){return decodeURIComponent(s.replace(pluses,' '));} var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);if(value===null){options.expires=-1;} if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);} value=config.json?JSON.stringify(value):String(value);return(document.cookie=[encodeURIComponent(key),'=',config.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));} var decode=config.raw?raw:decoded;var cookies=document.cookie.split('; ');for(var i=0,l=cookies.length;ie.distY){if(e.distX>-e.distY){if(e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swiperight';trigger(e.currentTarget,event);}} else{if(-e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipeup';trigger(e.currentTarget,event);}}} else{if(e.distX>-e.distY){if(e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipedown';trigger(e.currentTarget,event);}} else{if(-e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swipeleft';trigger(e.currentTarget,event);}}}} function getData(node){var data=jQuery.data(node,'event_swipe');if(!data){data={count:0};jQuery.data(node,'event_swipe',data);} return data;} jQuery.event.special.swipe=jQuery.event.special.swipeleft=jQuery.event.special.swiperight=jQuery.event.special.swipeup=jQuery.event.special.swipedown={setup:function(data,namespaces,eventHandle){var data=getData(this);if(data.count++>0){return;} add(this,'moveend',moveend);return true;},teardown:function(){var data=getData(this);if(--data.count>0){return;} remove(this,'moveend',moveend);return true;},settings:settings};});;;(function($,window,undefined){'use strict';$.fn.foundationAlerts=function(options){var settings=$.extend({callback:$.noop},options);$(document).on("click",".alert-box a.close",function(e){e.preventDefault();$(this).closest(".alert-box").fadeOut(function(){$(this).remove();settings.callback();});});};})(jQuery,this);;;(function($,window,undefined){'use strict';var settings={bodyHeight:0,selector:'.has-tip',additionalInheritableClasses:[],tooltipClass:'.tooltip',tipTemplate:function(selector,content){return''+content+'';}},methods={init:function(options){settings=$.extend(settings,options);settings.selector=settings.targetClass?settings.targetClass:settings.selector;return this.each(function(){var $body=$('body');if(Modernizr.touch){$body.on('click.tooltip touchstart.tooltip touchend.tooltip',settings.selector,function(e){e.preventDefault();$(settings.tooltipClass).hide();methods.showOrCreateTip($(this));});$body.on('click.tooltip touchstart.tooltip touchend.tooltip',settings.tooltipClass,function(e){e.preventDefault();$(this).fadeOut(150);});}else{$body.on('mouseenter.tooltip mouseleave.tooltip',settings.selector,function(e){var $this=$(this);if(e.type==='mouseenter'){methods.showOrCreateTip($this);}else if(e.type==='mouseleave'){methods.hide($this);}});} $(this).data('tooltips',true);});},showOrCreateTip:function($target,content){var $tip=methods.getTip($target);if($tip&&$tip.length>0){methods.show($target);}else{methods.create($target,content);}},getTip:function($target){var selector=methods.selector($target),tip=null;if(selector){tip=$('span[data-selector='+selector+']'+settings.tooltipClass);} return(tip.length>0)?tip:false;},selector:function($target){var id=$target.attr('id'),dataSelector=$target.data('selector');if(id===undefined&&dataSelector===undefined){dataSelector='tooltip'+Math.random().toString(36).substring(7);$target.attr('data-selector',dataSelector);} return(id)?id:dataSelector;},create:function($target,content){var $tip=$(settings.tipTemplate(methods.selector($target),$('
').html(content?content:$target.attr('title')).html())),classes=methods.inheritable_classes($target);$tip.addClass(classes).appendTo('body');if(Modernizr.touch){$tip.append('tap to close ');} $target.removeAttr('title');methods.show($target);},reposition:function(target,tip,classes){var width,nub,nubHeight,nubWidth,column,objPos;tip.css('visibility','hidden').show();width=target.data('width');nub=tip.children('.nub');nubHeight=nub.outerHeight();nubWidth=nub.outerWidth();objPos=function(obj,top,right,bottom,left,width){return obj.css({'top':top,'bottom':bottom,'left':left,'right':right,'max-width':(width)?width:'auto'}).end();};objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',target.offset().left,width);objPos(nub,-nubHeight,'auto','auto',10);if($(window).width()<767){if(target.data('mobile-width')){tip.width(target.data('mobile-width')).css('left',15).addClass('tip-override');}else{column=target.closest('.columns');if(column.length<0){column=$('body');} if(column.outerWidth()){tip.width(column.outerWidth()-25).css('left',15).addClass('tip-override');}else{var tmp_width=Math.ceil($(window).width()*0.9);tip.width(tmp_width).css('left',15).addClass('tip-override');}} objPos(nub,-nubHeight,'auto','auto',target.offset().left);}else{if(classes&&classes.indexOf('tip-top')>-1){objPos(tip,(target.offset().top-tip.outerHeight()-nubHeight),'auto','auto',target.offset().left,width).removeClass('tip-override');objPos(nub,'auto','auto',-nubHeight,'auto');}else if(classes&&classes.indexOf('tip-left')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-nubHeight),'auto','auto',(target.offset().left-tip.outerWidth()-10),width).removeClass('tip-override');objPos(nub,(tip.outerHeight()/2)-(nubHeight/2),-nubHeight,'auto','auto');}else if(classes&&classes.indexOf('tip-right')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-nubHeight),'auto','auto',(target.offset().left+target.outerWidth()+10),width).removeClass('tip-override');objPos(nub,(tip.outerHeight()/2)-(nubHeight/2),'auto','auto',-nubHeight);}else if(classes&&classes.indexOf('tip-centered-top')>-1){objPos(tip,(target.offset().top-tip.outerHeight()-nubHeight),'auto','auto',(target.offset().left+((target.outerWidth()-tip.outerWidth())/2)),width).removeClass('tip-override');objPos(nub,'auto',((tip.outerWidth()/2)-(nubHeight/2)),-nubHeight,'auto');}else if(classes&&classes.indexOf('tip-centered-bottom')>-1){objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',(target.offset().left+((target.outerWidth()-tip.outerWidth())/2)),width).removeClass('tip-override');objPos(nub,-nubHeight,((tip.outerWidth()/2)-(nubHeight/2)),'auto','auto');}} tip.css('visibility','visible').hide();},inheritable_classes:function(target){var inheritables=['tip-top','tip-left','tip-bottom','tip-right','tip-centered-top','tip-centered-bottom','noradius'].concat(settings.additionalInheritableClasses),classes=target.attr('class'),filtered=classes?$.map(classes.split(' '),function(el,i){if($.inArray(el,inheritables)!==-1){return el;}}).join(' '):'';return $.trim(filtered);},show:function($target){var $tip=methods.getTip($target);methods.reposition($target,$tip,$target.attr('class'));$tip.fadeIn(150);},hide:function($target){var $tip=methods.getTip($target);$tip.fadeOut(150);},reload:function(){var $self=$(this);return($self.data('tooltips'))?$self.foundationTooltips('destroy').foundationTooltips('init'):$self.foundationTooltips('init');},destroy:function(){return this.each(function(){$(window).off('.tooltip');$(settings.selector).off('.tooltip');$(settings.tooltipClass).each(function(i){$($(settings.selector).get(i)).attr('title',$(this).text());}).remove();});}};$.fn.foundationTooltips=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.foundationTooltips');}};}(jQuery,this));;;(function($,window,undefined){'use strict';var settings={index:0,initialized:false},methods={init:function(options){return this.each(function(){settings=$.extend(settings,options);settings.$w=$(window),settings.$topbar=$('nav.top-bar'),settings.$section=settings.$topbar.find('section'),settings.$titlebar=settings.$topbar.children('ul:first');var breakpoint=$("
").appendTo("body");settings.breakPoint=breakpoint.width();breakpoint.remove();if(!settings.initialized){methods.assemble();settings.initialized=true;} if(!settings.height){methods.largestUL();} if(settings.$topbar.parent().hasClass('fixed')){$('body').css('padding-top',settings.$topbar.outerHeight())} $('.top-bar .toggle-topbar').off('click.fndtn').on('click.fndtn',function(e){e.preventDefault();if(methods.breakpoint()){settings.$topbar.toggleClass('expanded');settings.$topbar.css('min-height','');} if(!settings.$topbar.hasClass('expanded')){settings.$section.css({left:'0%'});settings.$section.find('>.name').css({left:'100%'});settings.$section.find('li.moved').removeClass('moved');settings.index=0;}});$('.top-bar .has-dropdown>a').off('click.fndtn').on('click.fndtn',function(e){if(Modernizr.touch||methods.breakpoint()) e.preventDefault();if(methods.breakpoint()){var $this=$(this),$selectedLi=$this.closest('li');settings.index+=1;$selectedLi.addClass('moved');settings.$section.css({left:-(100*settings.index)+'%'});settings.$section.find('>.name').css({left:100*settings.index+'%'});$this.siblings('ul').height(settings.height+settings.$titlebar.outerHeight(true));settings.$topbar.css('min-height',settings.height+settings.$titlebar.outerHeight(true)*2)}});$(window).on('resize.fndtn.topbar',function(){if(!methods.breakpoint()){settings.$topbar.css('min-height','');}});$('.top-bar .has-dropdown .back').off('click.fndtn').on('click.fndtn',function(e){e.preventDefault();var $this=$(this),$movedLi=$this.closest('li.moved'),$previousLevelUl=$movedLi.parent();settings.index-=1;settings.$section.css({left:-(100*settings.index)+'%'});settings.$section.find('>.name').css({'left':100*settings.index+'%'});if(settings.index===0){settings.$topbar.css('min-height',0);} setTimeout(function(){$movedLi.removeClass('moved');},300);});});},breakpoint:function(){return settings.$w.width()a').each(function(){var $link=$(this),$dropdown=$link.siblings('.dropdown'),$titleLi=$('
  • ');$titleLi.find('h5>a').html($link.html());$dropdown.prepend($titleLi);});settings.$section.appendTo(settings.$topbar);},largestUL:function(){var uls=settings.$topbar.find('section ul ul'),largest=uls.first(),total=0;uls.each(function(){if($(this).children('li').length>largest.children('li').length){largest=$(this);}});largest.children('li').each(function(){total+=$(this).outerHeight(true);});settings.height=total;}};$.fn.foundationTopBar=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.foundationTopBar');}};if($('.sticky').length>0){var distance=$('.sticky').length?$('.sticky').offset().top:0,$window=$(window);$window.scroll(function(){if($window.scrollTop()>=distance){$(".sticky").addClass("fixed");} else if($window.scrollTop()').attr($.extend(args(this),{'type':'text'}));} $replacement.removeAttr('name').data({'placeholder-password':true,'placeholder-id':id}).bind('focus.placeholder',clearPlaceholder);$input.data({'placeholder-textinput':$replacement,'placeholder-id':id}).before($replacement);} $input=$input.removeAttr('id').hide().prev().attr('id',id).show();} $input.addClass('placeholder');$input[0].value=$input.attr('placeholder');}else{$input.removeClass('placeholder');}}}(this,document,jQuery));;;(function($,window,undefined){'use strict';var $doc=$(document),Modernizr=window.Modernizr;$(document).ready(function(){$.fn.foundationAlerts?$doc.foundationAlerts():null;$.fn.foundationButtons?$doc.foundationButtons():null;$.fn.foundationAccordion?$doc.foundationAccordion():null;$.fn.foundationNavigation?$doc.foundationNavigation():null;$.fn.foundationTopBar?$doc.foundationTopBar():null;$.fn.foundationCustomForms?$doc.foundationCustomForms():null;$.fn.foundationMediaQueryViewer?$doc.foundationMediaQueryViewer():null;$.fn.foundationTabs?$doc.foundationTabs({callback:$.foundation.customForms.appendCustomMarkup}):null;$.fn.foundationTooltips?$doc.foundationTooltips():null;$.fn.foundationMagellan?$doc.foundationMagellan():null;$.fn.foundationClearing?$doc.foundationClearing():null;$.fn.placeholder?$('input, textarea').placeholder():null;});if(Modernizr.touch&&!window.location.hash){$(window).load(function(){setTimeout(function(){if($(window).scrollTop()<20){window.scrollTo(0,1);}},0);});}})(jQuery,this);;(function(a){function c(a,b,c){var d=a.children(),e=!1;a.empty();for(var g=0,h=d.length;h>g;g++){var i=d.eq(g);if(a.append(i),c&&a.append(c),f(a,b)){i.remove(),e=!0;break}c&&c.remove()}return e}function d(b,c,g,h,i){var j=b.contents(),k=!1;b.empty();for(var l="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, select, optgroup, option, textarea, script, style",m=0,n=j.length;n>m&&!k;m++){var o=j[m],p=a(o);void 0!==o&&(b.append(p),i&&b[b.is(l)?"after":"append"](i),3==o.nodeType?f(g,h)&&(k=e(p,c,g,h,i)):k=d(p,c,g,h,i),k||i&&i.remove())}return k}function e(a,b,c,d,h){var k=!1,l=a[0];if(l===void 0)return!1;for(var m="letter"==d.wrap?"":" ",n=j(l).split(m),o=-1,p=-1,q=0,r=n.length-1;r>=q;){var s=Math.floor((q+r)/2);if(s==p)break;p=s,i(l,n.slice(0,p+1).join(m)+d.ellipsis),f(c,d)?r=p:(o=p,q=p)}if(-1==o||1==n.length&&0==n[0].length){var u=a.parent();a.remove();var v=h?h.length:0;if(u.contents().size()>v){var w=u.contents().eq(-1-v);k=e(w,b,c,d,h)}else{var x=u.prev(),l=x.contents().eq(-1)[0];if(l!==void 0){var t=g(j(l),d);i(l,t),h&&x.append(h),u.remove(),k=!0}}}else{var t=g(n.slice(0,o+1).join(m),d);k=!0,i(l,t)}return k}function f(a,b){return a.innerHeight()>b.maxHeight}function g(b,c){for(;a.inArray(b.slice(-1),c.lastCharacter.remove)>-1;)b=b.slice(0,-1);return 0>a.inArray(b.slice(-1),c.lastCharacter.noEllipsis)&&(b+=c.ellipsis),b}function h(a){return{width:a.innerWidth(),height:a.innerHeight()}}function i(a,b){a.innerText?a.innerText=b:a.nodeValue?a.nodeValue=b:a.textContent&&(a.textContent=b)}function j(a){return a.innerText?a.innerText:a.nodeValue?a.nodeValue:a.textContent?a.textContent:""}function k(b,c){return b===void 0?!1:b?"string"==typeof b?(b=a(b,c),b.length?b:!1):"object"==typeof b?b.jquery===void 0?!1:b:!1:!1}function l(a){for(var b=a.innerHeight(),c=["paddingTop","paddingBottom"],d=0,e=c.length;e>d;d++){var f=parseInt(a.css(c[d]),10);isNaN(f)&&(f=0),b-=f}return b}function m(a,b){return a?(b="string"==typeof b?"dotdotdot: "+b:["dotdotdot:",b],window.console!==void 0&&window.console.log!==void 0&&window.console.log(b),!1):!1}if(!a.fn.dotdotdot){a.fn.dotdotdot=function(e){if(0==this.length)return e&&e.debug===!1||m(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){a(this).dotdotdot(e)});var g=this;g.data("dotdotdot")&&g.trigger("https://evermotion.org/destroy.dot"),g.data("dotdotdot-style",g.attr("style")),g.css("word-wrap","break-word"),g.bind_events=function(){return g.bind("https://evermotion.org/update.dot",function(b,e){b.preventDefault(),b.stopPropagation(),j.maxHeight="number"==typeof j.height?j.height:l(g),j.maxHeight+=j.tolerance,e!==void 0&&(("string"==typeof e||e instanceof HTMLElement)&&(e=a("
    ").append(e).contents()),e instanceof a&&(i=e)),q=g.wrapInner('
    ').children(),q.empty().append(i.clone(!0)).css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var h=!1,k=!1;return n.afterElement&&(h=n.afterElement.clone(!0),n.afterElement.remove()),f(q,j)&&(k="children"==j.wrap?c(q,j,h):d(q,g,q,j,h)),q.replaceWith(q.contents()),q=null,a.isFunction(j.callback)&&j.callback.call(g[0],k,i),n.isTruncated=k,k}).bind("https://evermotion.org/isTruncated.dot",function(a,b){return a.preventDefault(),a.stopPropagation(),"function"==typeof b&&b.call(g[0],n.isTruncated),n.isTruncated}).bind("https://evermotion.org/originalContent.dot",function(a,b){return a.preventDefault(),a.stopPropagation(),"function"==typeof b&&b.call(g[0],i),i}).bind("https://evermotion.org/destroy.dot",function(a){a.preventDefault(),a.stopPropagation(),g.unwatch().unbind_events().empty().append(i).attr("style",g.data("dotdotdot-style")).data("dotdotdot",!1)}),g},g.unbind_events=function(){return g.unbind(".dot"),g},g.watch=function(){if(g.unwatch(),"window"==j.watch){var b=a(window),c=b.width(),d=b.height();b.bind("https://evermotion.org/resize.dot"+n.dotId,function(){c==b.width()&&d==b.height()&&j.windowResizeFix||(c=b.width(),d=b.height(),p&&clearInterval(p),p=setTimeout(function(){g.trigger("https://evermotion.org/update.dot")},10))})}else o=h(g),p=setInterval(function(){var a=h(g);(o.width!=a.width||o.height!=a.height)&&(g.trigger("https://evermotion.org/update.dot"),o=h(g))},100);return g},g.unwatch=function(){return a(window).unbind("https://evermotion.org/resize.dot"+n.dotId),p&&clearInterval(p),g};var i=g.contents(),j=a.extend(!0,{},a.fn.dotdotdot.defaults,e),n={},o={},p=null,q=null;return n.afterElement=k(j.after,g),n.isTruncated=!1,n.dotId=b++,g.data("dotdotdot",!0).bind_events().trigger("https://evermotion.org/update.dot"),j.watch&&g.watch(),g},a.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0,debug:!1};var b=1,n=a.fn.html;a.fn.html=function(a){return a!==void 0?this.data("dotdotdot")&&"function"!=typeof a?this.trigger("update",[a]):n.call(this,a):n.call(this)};var o=a.fn.text;a.fn.text=function(b){if(b!==void 0){if(this.data("dotdotdot")){var c=a("
    ");return c.text(b),b=c.html(),c.remove(),this.trigger("update",[b])}return o.call(this,b)}return o.call(this)}}})(jQuery);;!function(d){var h=function(a){this.messages={defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",urlstrict:"This value should be a valid url.",number:"This value should be a valid number.",digits:"This value should be digits.",dateIso:"This value should be a valid date (YYYY-MM-DD).",alphanum:"This value should be alphanumeric.",phone:"This value should be a valid phone number."},notnull:"This value should not be null.",notblank:"This value should not be blank.",required:"This value is required.",regexp:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or less.",rangelength:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or less.",rangecheck:"You must select between %s and %s choices.",equalto:"This value should be the same."};this.init(a)};h.prototype={constructor:h,validators:{notnull:function(a){return 0=b},maxlength:function(a,b){return a.length<=b},rangelength:function(a,b){return this.minlength(a,b[0])&&this.maxlength(a,b[1])},min:function(a,b){return Number(a)>=b},max:function(a,b){return Number(a)<=b},range:function(a,b){return a>=b[0]&&a<=b[1]},equalto:function(a,b,c){c.options.validateIfUnchanged=!0;return a===d(b).val()},remote:function(a,b,c){var f={},g={};f[c.$element.attr("name")]=a;"undefined"!==typeof c.options.remoteDatatype&&(g={dataType:c.options.remoteDatatype});var m=function(a,b){"undefined"!==typeof b&&("undefined"!==typeof c.Validator.messages.remote&&b!==c.Validator.messages.remote)&&d(c.ulError+" .remote").remove();c.updtConstraint({name:"remote",valid:a},b);c.manageValidationResult()},n=function(a){if("object"===typeof a)return a;try{a=d.parseJSON(a)}catch(b){}return a},e=function(a){return"object"===typeof a&&null!==a?"undefined"!==typeof a.error?a.error:"undefined"!==typeof a.message?a.message:null:null};d.ajax(d.extend({},{url:b,data:f,type:c.options.remoteMethod||"GET",success:function(a){a=n(a);m(1===a||!0===a||"object"===typeof a&&null!==a&&"undefined"!==typeof a.success,e(a))},error:function(a){a=n(a);m(!1,e(a))}},g));return null},mincheck:function(a,b){return this.minlength(a,b)},maxcheck:function(a,b){return this.maxlength(a,b)},rangecheck:function(a,b){return this.rangelength(a,b)}},init:function(a){var b=a.validators;a=a.messages;for(var c in b)this.addValidator(c,b[c]);for(c in a)this.addMessage(c,a[c])},formatMesssage:function(a,b){if("object"===typeof b){for(var c in b)a=this.formatMesssage(a,b[c]);return a}return"string"===typeof a?a.replace(/%s/i,b):""},addValidator:function(a,b){this.validators[a]=b},addMessage:function(a,b,c){if("undefined"!==typeof c&&!0===c)this.messages.type[a]=b;else if("type"===a)for(var d in b)this.messages.type[d]=b[d];else this.messages[a]=b}};var j=function(a,b,c){this.options=b;this.Validator=new h(b);if("ParsleyFieldMultiple"===c)return this;this.init(a,c||"ParsleyField")};j.prototype={constructor:j,init:function(a,b){this.type=b;this.valid=!0;this.element=a;this.validatedOnce=!1;this.$element=d(a);this.val=this.$element.val();this.isRequired=!1;this.constraints={};"undefined"===typeof this.isRadioOrCheckbox&&(this.isRadioOrCheckbox=!1,this.hash=this.generateHash(),this.errorClassHandler=this.options.errors.classHandler(a,this.isRadioOrCheckbox)||this.$element);this.ulErrorManagement();this.bindHtml5Constraints();this.addConstraints();this.hasConstraints()&&this.bindValidationEvents()},setParent:function(a){this.$parent=d(a)},getParent:function(){return this.$parent},bindHtml5Constraints:function(){if(this.$element.hasClass("required")||this.$element.prop("required"))this.options.required=!0;"undefined"!==typeof this.$element.attr("type")&&RegExp(this.$element.attr("type"),"i").test("email url number range")&&(this.options.type=this.$element.attr("type"),RegExp(this.options.type,"i").test("number range")&&(this.options.type="number","undefined"!==typeof this.$element.attr("min")&&this.$element.attr("min").length&&(this.options.min=this.$element.attr("min")),"undefined"!==typeof this.$element.attr("max")&&this.$element.attr("max").length&&(this.options.max=this.$element.attr("max"))));"string"===typeof this.$element.attr("pattern")&&this.$element.attr("pattern").length&&(this.options.regexp=this.$element.attr("pattern"))},addConstraints:function(){for(var a in this.options){var b={};b[a]=this.options[a];this.addConstraint(b,!0)}},addConstraint:function(a,b){for(var c in a)c=c.toLowerCase(),"function"===typeof this.Validator.validators[c]&&(this.constraints[c]={name:c,requirements:a[c],valid:null},"required"===c&&(this.isRequired=!0),this.addCustomConstraintMessage(c));"undefined"===typeof b&&this.bindValidationEvents()},updateConstraint:function(a,b){for(var c in a)this.updtConstraint({name:c,requirements:a[c],valid:null},b)},updtConstraint:function(a,b){this.constraints[a.name]=d.extend(!0,this.constraints[a.name],a);"string"===typeof b&&(this.Validator.messages[a.name]=b);this.bindValidationEvents()},removeConstraint:function(a){a=a.toLowerCase();delete this.constraints[a];"required"===a&&(this.isRequired=!1);this.hasConstraints()?this.bindValidationEvents():"ParsleyForm"===typeof this.getParent()?this.getParent().removeItem(this.$element):this.destroy()},addCustomConstraintMessage:function(a){var b=a+("type"===a&&"undefined"!==typeof this.options[a]?this.options[a].charAt(0).toUpperCase()+this.options[a].substr(1):"")+"Message";"undefined"!==typeof this.options[b]&&this.Validator.addMessage("type"===a?this.options[a]:a,this.options[b],"type"===a)},bindValidationEvents:function(){this.valid=null;this.$element.addClass("parsley-validated");this.$element.off("."+this.type);this.options.remote&&!/change/i.test(this.options.trigger)&&(this.options.trigger=!this.options.trigger?"change":" change");var a=(!this.options.trigger?"":this.options.trigger)+(/key/i.test(this.options.trigger)?"":" keyup");this.$element.is("select")&&(a+=/change/i.test(a)?"":" change");a=a.replace(/^\s+/g,"").replace(/\s+$/g,"");this.$element.on((a+" ").split(" ").join("."+this.type+" "),!1,d.proxy(this.eventValidation,this))},generateHash:function(){return"parsley-"+(Math.random()+"").substring(2)},getHash:function(){return this.hash},getVal:function(){return this.$element.data("value")||this.$element.val()},eventValidation:function(a){var b=this.getVal();if("keyup"===a.type&&!/keyup/i.test(this.options.trigger)&&!this.validatedOnce||"change"===a.type&&!/change/i.test(this.options.trigger)&&!this.validatedOnce||!this.isRadioOrCheckbox&&b.length",errorElem:"
  • "},listeners:{onFieldValidate:function(){return!1},onFormSubmit:function(){},onFieldError:function(){},onFieldSuccess:function(){}}};d(window).on("load",function(){d('[data-validate="parsley"]').each(function(){d(this).parsley()})})}(window.jQuery||window.Zepto);