var BetterContactForm=(function(BetterContactForm){var _ID="23f1924939ec316567bdaa1eed06ed53f122997d";var Sly=(function(){"use strict";var cache={};var Sly=function(text,context,results,options){text=(typeof(text)=='string')?text.replace(/^\s+|\s+$/g,''):'';var cls=cache[text]||(cache[text]=new Sly.initialize(text));return(context==null)?cls:cls.search(context,results,options);};Sly.initialize=function(text){this.text=text;};var proto=Sly.initialize.prototype=Sly.prototype;Sly.implement=function(key,properties){for(var prop in properties)Sly[key][prop]=properties[prop];};var support=Sly.support={};(function(){var testee=document.createElement('div'),id=(new Date()).getTime();testee.innerHTML='';testee.appendChild(document.createComment(''));support.byTagAddsComments=(testee.getElementsByTagName('*').length>1);support.hasQsa=!!(testee.querySelectorAll&&testee.querySelectorAll('.€').length);support.hasByClass=(function(){if(!testee.getElementsByClassName||!testee.getElementsByClassName('b').length)return false;testee.firstChild.className='c';return(testee.getElementsByClassName('c').length==1);})();var root=document.documentElement;root.insertBefore(testee,root.firstChild);support.byIdAddsName=!!(document.getElementById(id));root.removeChild(testee);})();var locateFast=function(){return true;};proto.search=function(context,results,options){options=options||{};var iterate,i,item;if(!context){context=document;}else if(context.nodeType!=1&&context.nodeType!=9){if(typeof(context)=='string'){context=Sly.search(context);iterate=true;}else if(Object.prototype.toString.call(context)=='[object Array]'||(typeof(context.length)=='number'&&context.item)){var filtered=[];for(i=0;(item=context[i]);i++){if(item.nodeType==1||item.nodeType==9)filtered.push(item);} iterate=(filtered.length>1);context=(iterate)?filtered:(filtered[0]||document);}} var mixed,combined,nodes,all={},state={};var current=all;var getUid=Sly.getUid;var locateCurrent=function(node){var uid=getUid(node);return(current[uid])?null:(current[uid]=true);};if(results&&results.length){for(i=0;(item=results[i]);i++)locateCurrent(item);} if(support.hasQsa&&!iterate&&context.nodeType==9&&!(/\[/).test(this.text)){try{var query=context.querySelectorAll(this.text);}catch(e){} if(query){if(!results)return Sly.toArray(query);for(i=0;(item=query[i]);i++){if(locateCurrent(item))results.push(item);} if(!options.unordered)results.sort(Sly.compare);return results;}} var parsed=this.parse();if(!parsed.length)return[];for(var i=0,selector;(selector=parsed[i]);i++){var locate=locateCurrent;if(selector.first){if(!results)locate=locateFast;else mixed=true;if(iterate)nodes=context;else if(selector.combinator)nodes=[context];} if(selector.last&&results){current=all;combined=results;}else{current={};combined=[];} if(!selector.combinator&&!iterate){combined=selector.combine(combined,context,selector,state,locate,!(combined.length));}else{for(var k=0,l=nodes.length;k1)?'unshift':'push'](Sly.escapeRegExp(key));}} for(key in operators)operList.push(key);pattern=new RegExp('[\\w\\u00a1-\\uFFFF][\\w\\u00a1-\\uFFFF-]*|'+'[#.](?:[\\w\\u00a1-\\uFFFF-]|\\\\:|\\\\.)+|'+'[ \\t\\r\\n\\f](?=[\\w\\u00a1-\\uFFFF*#.[:])|'+'[ \\t\\r\\n\\f]*('+combList.join('|')+')[ \\t\\r\\n\\f]*|'+'\\[([\\w\\u00a1-\\uFFFF-]+)[ \\t\\r\\n\\f]*(?:(['+operList.join('')+']?=)[ \\t\\r\\n\\f]*(?:"([^"]*)"|\'([^\']*)\'|([^\\]]*)))?]|'+':([-\\w\\u00a1-\\uFFFF]+)(?:\\((?:"([^"]*)"|\'([^\']*)\'|([^)]*))\\))?|'+'\\*|(.+)','g');};var create=function(combinator){return{ident:[],classes:[],attributes:[],pseudos:[],combinator:combinator};};var blank=function($0){return $0;};proto.parse=function(plain){var save=(plain)?'plain':'parsed';if(this[save])return this[save];var text=this.text;var compute=(plain)?blank:this.compute;var parsed=[],current=create(null);current.first=true;var refresh=function(combinator){parsed.push(compute(current));current=create(combinator);};pattern.lastIndex=0;var match,$0;while((match=pattern.exec(text))){if(match[11]){if(Sly.verbose)throw SyntaxError('Syntax error, "'+$0+'" unexpected at #'+pattern.lastIndex+' in "'+text+'"');return(this[save]=[]);} $0=match[0];switch($0.charAt(0)){case'.':current.classes.push($0.slice(1).replace(/\\/g,''));break;case'#':current.id=$0.slice(1).replace(/\\/g,'');break;case'[':current.attributes.push({name:match[2],operator:match[3]||null,value:match[4]||match[5]||match[6]||null});break;case':':current.pseudos.push({name:match[7],value:match[8]||match[9]||match[10]||null});break;case' ':case'\t':case'\r':case'\n':case'\f':match[1]=match[1]||' ';default:var combinator=match[1];if(combinator){if(combinator==','){current.last=true;refresh(null);current.first=true;continue;} if(current.first&&!current.ident.length)current.combinator=combinator;else refresh(combinator);}else{if($0!='*')current.tag=$0;}} current.ident.push($0);} current.last=true;parsed.push(compute(current));return(this[save]=parsed);};function chain(prepend,append,aux,unshift){return(prepend)?((unshift)?function(node,state){return append(node,aux,state)&&prepend(node,state);}:function(node,state){return prepend(node,state)&&append(node,aux,state);}):function(node,state){return append(node,aux,state);};};var empty=function(){return true;};var matchId=function(node,id){return(node.id==id);};var matchTag=function(node,tag){return(node.nodeName.toUpperCase()==tag);};var prepareClass=function(name){return(new RegExp('(?:^|[ \\t\\r\\n\\f])'+name+'(?:$|[ \\t\\r\\n\\f])'));};var matchClass=function(node,expr){return node.className&&expr.test(node.className);};var prepareAttribute=function(attr){attr.getter=Sly.lookupAttribute(attr.name)||Sly.getAttribute;if(!attr.operator||!attr.value)return attr;var parser=operators[attr.operator];if(parser){attr.escaped=Sly.escapeRegExp(attr.value);attr.pattern=new RegExp(parser(attr.value,attr.escaped,attr));} return attr;};var matchAttribute=function(node,attr){var read=attr.getter(node,attr.name);switch(attr.operator){case null:return read;case'=':return(read==attr.value);case'!=':return(read!=attr.value);} if(!read&&attr.value)return false;return attr.pattern.test(read);};proto.compute=function(selector){var i,item,match,search,matchSearch,tagged,tag=selector.tag,id=selector.id,classes=selector.classes;var nodeName=(tag)?tag.toUpperCase():null;if(id){tagged=true;matchSearch=chain(null,matchId,id);search=function(context){if(context.getElementById){var el=context.getElementById(id);return(el&&(!nodeName||el.nodeName.toUpperCase()==nodeName)&&(!support.getIdAdds||el.id==id))?[el]:[];} var query=context.getElementsByTagName(tag||'*');for(var j=0,node;(node=query[j]);j++){if(node.id==id)return[node];} return[];};} if(classes.length>0){if(!search&&support.hasByClass){for(i=0;(item=classes[i]);i++){matchSearch=chain(matchSearch,matchClass,prepareClass(item));} var joined=classes.join(' ');search=function(context){return context.getElementsByClassName(joined);};}else if(!search&&classes.length==1){tagged=true;var expr=prepareClass(classes[0]);matchSearch=chain(matchSearch,matchClass,expr);search=function(context){var query=context.getElementsByTagName(tag||'*');var found=[];for(var i=0,node;(node=query[i]);i++){if(node.className&&expr.test(node.className))found.push(node);} return found;};}else{for(i=0;(item=classes[i]);i++){match=chain(match,matchClass,prepareClass(item));}}} if(tag){if(!search){matchSearch=chain(matchSearch,matchTag,nodeName);search=function(context){return context.getElementsByTagName(tag);};}else if(!tagged){match=chain(match,matchTag,nodeName);}}else if(!search){search=function(context){var query=context.getElementsByTagName('*');if(!support.byTagAddsComments)return query;var found=[];for(var i=0,node;(node=query[i]);i++){if(node.nodeType===1)found.push(node);} return found;};} for(i=0;(item=selector.pseudos[i]);i++){if(item.name=='not'){var not=Sly(item.value);match=chain(match,function(node,not){return!not.match(node);},(not.parse().length==1)?not.parsed[0]:not);}else{var parser=pseudos[item.name];if(parser)match=chain(match,parser,item.value);}} for(i=0;(item=selector.attributes[i]);i++){match=chain(match,matchAttribute,prepareAttribute(item));} if((selector.simple=!(match))){selector.matchAux=empty;}else{selector.matchAux=match;matchSearch=chain(matchSearch,match);} selector.match=matchSearch||empty;selector.combine=Sly.combinators[selector.combinator||' '];selector.search=search;return selector;};var combinators=Sly.combinators={' ':function(combined,context,selector,state,locate,fast){var nodes=selector.search(context);if(fast&&selector.simple)return Sly.toArray(nodes);for(var i=0,node,aux=selector.matchAux;(node=nodes[i]);i++){if(locate(node)&&aux(node,state))combined.push(node);} return combined;},'>':function(combined,context,selector,state,locate){var nodes=selector.search(context);for(var i=0,node;(node=nodes[i]);i++){if(node.parentNode==context&&locate(node)&&selector.matchAux(node,state))combined.push(node);} return combined;},'+':function(combined,context,selector,state,locate){while((context=context.nextSibling)){if(context.nodeType==1){if(locate(context)&&selector.match(context,state))combined.push(context);break;}} return combined;},'~':function(combined,context,selector,state,locate){while((context=context.nextSibling)){if(context.nodeType==1){if(!locate(context))break;if(selector.match(context,state))combined.push(context);}} return combined;}};var pseudos=Sly.pseudos={'first-child':function(node){return pseudos.index(node,0);},'last-child':function(node){while((node=node.nextSibling)){if(node.nodeType===1)return false;} return true;},'only-child':function(node){var prev=node;while((prev=prev.previousSibling)){if(prev.nodeType===1)return false;} var next=node;while((next=next.nextSibling)){if(next.nodeType===1)return false;} return true;},'nth-child':function(node,value,state){var parsed=Sly.parseNth(value||'n');if(parsed.special!='n')return pseudos[parsed.special](node,parsed.a,state);state=state||{};state.positions=state.positions||{};var uid=Sly.getUid(node);if(!state.positions[uid]){var count=0;while((node=node.previousSibling)){if(node.nodeType!=1)continue;count++;var position=state.positions[Sly.getUid(node)];if(position!=undefined){count=position+count;break;}} state.positions[uid]=count;} return(state.positions[uid]%parsed.a==parsed.b);},'empty':function(node){return!(node.innerText||node.textContent||'').length;},'contains':function(node,text){return(node.innerText||node.textContent||'').indexOf(text)!=-1;},'index':function(node,index){var count=1;while((node=node.previousSibling)){if(node.nodeType==1&&++count>index)return false;} return(count==index);},'even':function(node,value,state){return pseudos['nth-child'](node,'2n+1',state);},'odd':function(node,value,state){return pseudos['nth-child'](node,'2n',state);}};pseudos.first=pseudos['first-child'];pseudos.last=pseudos['last-child'];pseudos.nth=pseudos['nth-child'];pseudos.eq=pseudos.index;var operators=Sly.operators={'*=':function(value,escaped){return escaped;},'^=':function(value,escaped){return'^'+escaped;},'$=':function(value,escaped){return value+'$';},'~=':function(value,escaped){return'(?:^|[ \\t\\r\\n\\f])'+escaped+'(?:$|[ \\t\\r\\n\\f])';},'|=':function(value,escaped){return'(?:^|\\|)'+escaped+'(?:$|\\|)';}};var translate={'class':'className'} Sly.lookupAttribute=function(name){var prop=translate[name];if(prop){return function(node){return node[prop];}} var flag=/^(?:src|href|action)$/.test(name)?2:0;return function(node){return node.getAttribute(name,flag);}};Sly.getAttribute=function(node,name){return node.getAttribute(name);};var toArray=Array.slice||function(nodes){return Array.prototype.slice.call(nodes);};try{toArray(document.documentElement.childNodes);}catch(e){toArray=function(nodes){if(nodes instanceof Array)return nodes;var i=nodes.length,results=new Array(i);while(i--)results[i]=nodes[i];return results;};} Sly.toArray=toArray;Sly.compare=(document.compareDocumentPosition)?function(a,b){return(3-(a.compareDocumentPosition(b)&6));}:function(a,b){return(a.sourceIndex-b.sourceIndex);};var nextUid=1;Sly.getUid=(window.ActiveXObject)?function(node){return(node.$slyUid||(node.$slyUid={id:nextUid++})).id;}:function(node){return node.$slyUid||(node.$slyUid=nextUid++);};var nthCache={};Sly.parseNth=function(value){if(nthCache[value])return nthCache[value];var parsed=value.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!parsed)return false;var a=parseInt(parsed[1],10),b=(parseInt(parsed[3],10)||0)-1;if((a=(isNaN(a))?1:a)){while(b<1)b+=a;while(b>=a)b-=a;} switch(parsed[2]){case'n':parsed={a:a,b:b,special:'n'};break;case'odd':parsed={a:2,b:0,special:'n'};break;case'even':parsed={a:2,b:1,special:'n'};break;case'first':parsed={a:0,special:'index'};break;case'last':parsed={special:'last-child'};break;case'only':parsed={special:'only-child'};break;default:parsed={a:(a)?(a-1):b,special:'index'};} return(nthCache[value]=parsed);};Sly.escapeRegExp=function(text){return text.replace(/[-.*+?^${}()|[\]\/\\]/g,'\\$&');};Sly.generise=function(name){Sly[name]=function(text){var cls=Sly(text);return cls[name].apply(cls,Array.prototype.slice.call(arguments,1));}};var generics=['parse','search','find','match','filter'];for(var i=0;generics[i];i++)Sly.generise(generics[i]);Sly.recompile();return Sly;})();var Core=(function(){"use strict";var Core=function(){};Core.prototype={has:function(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);},keys:function(obj){if(typeof Object.keys!=='undefined'){return Object.keys(obj)};if(obj!==Object(obj))throw new TypeError('Invalid object');var keys=[];for(var key in obj)if(this.has(obj,key))keys.push(key);return keys;},each:function(obj,iterator,context){if(obj==null)return;if(Array.prototype.forEach&&obj.forEach===Array.prototype.forEach){obj.forEach(iterator,context);}else if(obj.length===+obj.length){for(var i=0,length=obj.length;i=0;i=i-1){if(form.elements[i].name===""){continue;} switch(form.elements[i].nodeName){case'INPUT':switch(form.elements[i].type){case'text':case'hidden':case'password':case'button':case'reset':case'submit':obj[form.elements[i].name]=encodeURIComponent(form.elements[i].value);break;case'checkbox':case'radio':if(form.elements[i].checked){obj[form.elements[i].name]=encodeURIComponent(form.elements[i].value);} break;case'file':break;} break;case'TEXTAREA':obj[form.elements[i].name]=encodeURIComponent(form.elements[i].value);break;case'SELECT':switch(form.elements[i].type){case'select-one':obj[form.elements[i].name]=encodeURIComponent(form.elements[i].value);break;case'select-multiple':for(j=form.elements[i].options.length-1;j>=0;j=j-1){if(form.elements[i].options[j].selected){obj[form.elements[i].name]=encodeURIComponent(form.elements[i].options[j].value);}} break;} break;case'BUTTON':switch(form.elements[i].type){case'reset':case'submit':case'button':obj[form.elements[i].name]=encodeURIComponent(form.elements[i].value);break;} break;}} return obj;}} return new Core();})();!('getComputedStyle'in this)&&(this.getComputedStyle=(function(){function getPixelSize(element,style,property,fontSize){var sizeWithSuffix=style[property],size=parseFloat(sizeWithSuffix),suffix=sizeWithSuffix.split(/\d/)[0],rootSize;fontSize=fontSize!=null?fontSize:/%|em/.test(suffix)&&element.parentElement?getPixelSize(element.parentElement,element.parentElement.currentStyle,'fontSize',null):16;rootSize=property=='fontSize'?fontSize:/width/i.test(property)?element.clientWidth:element.clientHeight;return(suffix=='em')?size*fontSize:(suffix=='in')?size*96:(suffix=='pt')?size*96/72:(suffix=='%')?size/100*rootSize:size;} function setShortStyleProperty(style,property){var borderSuffix=property=='border'?'Width':'',t=property+'Top'+borderSuffix,r=property+'Right'+borderSuffix,b=property+'Bottom'+borderSuffix,l=property+'Left'+borderSuffix;style[property]=(style[t]==style[r]==style[b]==style[l]?[style[t]]:style[t]==style[b]&&style[l]==style[r]?[style[t],style[r]]:style[l]==style[r]?[style[t],style[r],style[b]]:[style[t],style[r],style[b],style[l]]).join(' ');} function CSSStyleDeclaration(element){var currentStyle=element.currentStyle,style=this,fontSize=getPixelSize(element,currentStyle,'fontSize',null);for(property in currentStyle){if(/width|height|margin.|padding.|border.+W/.test(property)&&style[property]!=='auto'){style[property]=getPixelSize(element,currentStyle,property,fontSize)+'px';}else if(property==='styleFloat'){style['float']=currentStyle[property];}else{style[property]=currentStyle[property];}} setShortStyleProperty(style,'margin');setShortStyleProperty(style,'padding');setShortStyleProperty(style,'border');style.fontSize=fontSize+'px';return style;} CSSStyleDeclaration.prototype={constructor:CSSStyleDeclaration,getPropertyPriority:function(){},getPropertyValue:function(prop){return this[prop]||'';},item:function(){},removeProperty:function(){},setProperty:function(){},getPropertyCSSValue:function(){}};function getComputedStyle(element){return new CSSStyleDeclaration(element);} return getComputedStyle;})(this));this.Element&&Element.prototype.attachEvent&&!Element.prototype.addEventListener&&(function(){function addToPrototype(name,method){Window.prototype[name]=HTMLDocument.prototype[name]=Element.prototype[name]=method;} addToPrototype("addEventListener",function(type,listener){var target=this,listeners=target._c1_listeners=target._c1_listeners||{},typeListeners=listeners[type]=listeners[type]||[];console.log(type,target) if(!typeListeners.length){target.attachEvent("on"+type,typeListeners.event=function(event){var documentElement=target.document&&target.document.documentElement||target.documentElement||{scrollLeft:0,scrollTop:0};event.currentTarget=target;event.pageX=event.clientX+documentElement.scrollLeft;event.pageY=event.clientY+documentElement.scrollTop;event.preventDefault=function(){event.returnValue=false};event.relatedTarget=event.fromElement||null;event.stopImmediatePropagation=function(){immediatePropagation=false;event.cancelBubble=true};event.stopPropagation=function(){event.cancelBubble=true};event.relatedTarget=event.fromElement||null;event.target=event.srcElement||target;event.timeStamp=+new Date;for(var i=0,typeListenersCache=[].concat(typeListeners),typeListenerCache,immediatePropagation=true;immediatePropagation&&(typeListenerCache=typeListenersCache[i]);++i){for(var ii=0,typeListener;typeListener=typeListeners[ii];++ii){if(typeListener==typeListenerCache){typeListener.call(target,event);break;}}}});} typeListeners.push(listener);});addToPrototype("removeEventListener",function(type,listener){var target=this,listeners=target._c1_listeners=target._c1_listeners||{},typeListeners=listeners[type]=listeners[type]||[];for(var i=typeListeners.length-1,typeListener;typeListener=typeListeners[i];--i){if(typeListener==listener){typeListeners.splice(i,1);break;}} if(!typeListeners.length&&typeListeners.event){target.detachEvent("on"+type,typeListeners.event);}});addToPrototype("dispatchEvent",function(eventObject){var target=this,type=eventObject.type,listeners=target._c1_listeners=target._c1_listeners||{},typeListeners=listeners[type]=listeners[type]||[];try{return target.fireEvent("on"+type,eventObject);}catch(error){if(typeListeners.event){typeListeners.event(eventObject);} return;}});Object.defineProperty(Window.prototype,"CustomEvent",{get:function(){var self=this;return function CustomEvent(type,detail){detail=detail||{};var event=self.document.createEventObject(),key;event.type=type;event.returnValue=!detail.cancelable;event.cancelBubble=!detail.bubbles;for(key in detail){event[key]=detail[key];} return event;};}});})();if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement){"use strict";if(this===void 0||this===null){throw new TypeError();} var t=Object(this);var len=t.length>>>0;if(len===0){return-1;} var n=0;if(arguments.length>0){n=Number(arguments[1]);if(n!==n){n=0;}else if(n!==0&&n!==(1/0)&&n!==-(1/0)){n=(n>0||-1)*Math.floor(Math.abs(n));}} if(n>=len){return-1;} var k=n>=0?n:Math.max(len-Math.abs(n),0);for(;kjsMorph.speed);else jsMorph.speed=maxVal;initProp.speed=maxVal;if(onMorphInit)onMorphInit(initProp,dims);return initProp;}),timer=function(res){if(!res)return new Date().getTime()-timer.sT||0;else{timer.sT=new Date().getTime();return 0;}},anim=function(time,timer,backwards,frames,initProps,objs,jsMorph,IE){var tmpCSS,ease,cont=false,iPs,tmpTime,rewind,params,prop,initProp,val;for(var m=initProps.length;m--;){iPs=initProps[m];params=iPs.params;prop=iPs.prop;initProp=iPs.initProp;tmpTime=time-(iPs.newTime||0)-params.delay;if(objs&&!objs[m]&&!iPs.newTime)continue;tmpCSS='';if(tmpTime>0){rewind=(backwards||iPs.obj.backwards);ease=iPs.ease(tmpTime/params.duration);if(tmpTime-1}},f=0,c,s,p;if(r=r===n?"":String(r),u=u===n?"":String(u),i.match.call(u,h))throw new SyntaxError("invalid duplicate regular expression flag");for(r=i.replace.call(r,/^\(\?([\w$]+)\)/,function(n,t){if(i.test.call(/[gy]/,t))throw new SyntaxError("can't use flag g or y in mode modifier");return u=i.replace.call(u+t,h,""),""}),t.forEach(u,/[\s\S]/,function(n){if(w.indexOf(n[0])<0)throw new SyntaxError("invalid regular expression flag "+n[0]);});f"}else if(i)return"\\"+(+i+f);return n},e=[],r,u;if(!(s(n,"array")&&n.length))throw new TypeError("patterns must be a nonempty array");for(u=0;u1&&a(r,"")>-1&&(e=new RegExp(this.source,i.replace.call(g(this),"g","")),i.replace.call(String(t).slice(r.index),e,function(){for(var t=1;tr.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=o),r},r.test=function(n){return!!r.exec.call(this,n)},r.match=function(n){if(t.isRegExp(n)){if(n.global){var u=i.match.apply(this,arguments);return n.lastIndex=0,u}}else n=new RegExp(n);return r.exec.call(n,this)},r.replace=function(n,r){var e=t.isRegExp(n),u,f,h,o;return e?(n.xregexp&&(u=n.xregexp.captureNames),n.global||(o=n.lastIndex)):n+="",s(r,"function")?f=i.replace.call(String(this),n,function(){var t=arguments,i;if(u)for(t[0]=new String(t[0]),i=0;in.length-3)throw new SyntaxError("backreference to undefined group "+t);return n[r]||""}throw new SyntaxError("invalid token "+t);})})),e&&(n.lastIndex=n.global?0:o),f},r.split=function(r,u){if(!t.isRegExp(r))return i.split.apply(this,arguments);var e=String(this),h=r.lastIndex,f=[],o=0,s;return u=(u===n?-1:u)>>>0,t.forEach(e,r,function(n){n.index+n[0].length>o&&(f.push(e.slice(o,n.index)),n.length>1&&n.indexu?f.slice(0,u):f},u=c.on,u(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(n,t){if(n[1]==="B"&&t===e)return n[0];throw new SyntaxError("invalid escape "+n[0]);},{scope:"all"}),u(/\[(\^?)]/,function(n){return n[1]?"[\\s\\S]":"\\b\\B"}),u(/(?:\(\?#[^)]*\))+/,function(n){return i.test.call(nt,n.input.slice(n.index+n[0].length))?"":"(?:)"}),u(/\\k<([\w$]+)>/,function(n){var t=isNaN(n[1])?a(this.captureNames,n[1])+1:+n[1],i=n.index+n[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError("backreference to undefined group "+n[0]);return"\\"+t+(i===n.input.length||isNaN(n.input.charAt(i))?"":"(?:)")}),u(/(?:\s+|#.*)+/,function(n){return i.test.call(nt,n.input.slice(n.index+n[0].length))?"":"(?:)"},{trigger:function(){return this.hasFlag("x")},customFlags:"x"}),u(/\./,function(){return"[\\s\\S]"},{trigger:function(){return this.hasFlag("s")},customFlags:"s"}),u(/\(\?P?<([\w$]+)>/,function(n){if(!isNaN(n[1]))throw new SyntaxError("can't use integer as capture name "+n[0]);return this.captureNames.push(n[1]),this.hasNamedCapture=!0,"("}),u(/\\(\d+)/,function(n,t){if(!(t===e&&/^[1-9]/.test(n[1])&&+n[1]<=this.captureNames.length)&&n[1]!=="0")throw new SyntaxError("can't use octal escape or backreference to undefined group "+n[0]);return n[0]},{scope:"all"}),u(/\((?!\?)/,function(){return this.hasFlag("n")?"(?:":(this.captureNames.push(null),"(")},{customFlags:"n"}),typeof exports!="undefined"&&(exports.XRegExp=t),t}();(function(n){"use strict";function i(n){return n.replace(/[- _]+/g,"").toLowerCase()}function s(n){return n.replace(/\w{4}/g,"\\u$&")}function u(n){while(n.length<4)n="0"+n;return n}function f(n){return parseInt(n,16)}function r(n){return parseInt(n,10).toString(16)}function o(t){var e=[],i=-1,o;return n.forEach(t,/\\u(\w{4})(?:-\\u(\w{4}))?/,function(n){o=f(n[1]),o>i+1&&(e.push("\\u"+u(r(i+1))),o>i+2&&e.push("-\\u"+u(r(o-1)))),i=f(n[2]||n[1])}),i<65535&&(e.push("\\u"+u(r(i+1))),i<65534&&e.push("-\\uFFFF")),e.join("")}function e(n){return t["^"+n]||(t["^"+n]=o(t[n]))}var t={};n.install("extensibility"),n.addUnicodePackage=function(r,u){var f;if(!n.isInstalled("extensibility"))throw new Error("extensibility must be installed before adding Unicode packages");if(r)for(f in r)r.hasOwnProperty(f)&&(t[i(f)]=s(r[f]));if(u)for(f in u)u.hasOwnProperty(f)&&(t[i(u[f])]=t[i(f)])},n.addUnicodePackage({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05270531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A008A2-08AC0904-0939093D09500958-09610971-09770979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A793A7A0-A7AAA7F8-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"},{L:"Letter"}),n.addToken(/\\([pP]){(\^?)([^}]*)}/,function(n,r){var f=n[1]==="P"||n[2]?"^":"",u=i(n[3]);if(n[1]==="P"&&n[2])throw new SyntaxError("invalid double negation \\P{^");if(!t.hasOwnProperty(u))throw new SyntaxError("invalid or unknown Unicode property "+n[0]);return r==="class"?f?e(u):t[u]:"["+f+t[u]+"]"},{scope:"all"})})(XRegExp);var Validation=function(options){this.defaults={validated:function(){},validField:function(field){},invalidField:function(field){},tooltip:{offset:7,duration:2000}};this.rules={alphanum:new XRegExp('[0-9\\p{L}]'),url:new RegExp(/(https:[\/][\/]|http:[\/][\/]|www.)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~])*$/),email:new RegExp(/^[0-9a-zA-Z]+([0-9a-zA-Z]*[-._+])*[0-9a-zA-Z]+@[0-9a-zA-Z]+([-.][0-9a-zA-Z]+)*([0-9a-zA-Z]*[.])[a-zA-Z]{2,6}$/),message:new XRegExp('[0-9\\p{L}]'),phone:new RegExp(/^\+?([0-9+ -]){6,15}$/)};this.options=Core.defaults(options||{},this.defaults);return false;};Validation.prototype={validate:function(){return(function(_this,fields,validateResult){for(var i=fields.length-1;i>=0;i--){var _fieldValidateResult=_this.validateField(fields[i]);validateResult=validateResult&&_fieldValidateResult;};if(true===validateResult){_this.options.validated.call(_this);};})(this,Sly("[data-required]").search(ELEMENTS.ContactForm),true);},validateField:function(field){if(field.style.display=="none")return true;var inputValue=field.value||field.getAttribute("data-value")||String(),required=false,tooltipMessage=false;if(field.id==EDITOR_ELEMENT&&EDITOR!==false){inputValue=EDITOR.getContent(true).replace("\n","");} if(typeof field.getAttribute==='function'){required=field.getAttribute("data-required");}else{required=field["data-required"];} if(typeof required!=='undefined'&&required!==null){required=(required=="true"||required==true)?true:false;};if(required&&inputValue.length==0){tooltipMessage=field.getAttribute("data-message");}else if(required&&inputValue.length>0){var rule=field.getAttribute("data-type")||"alphanum";if(!this.rules[rule].test(inputValue)){tooltipMessage=field.getAttribute("data-message");}} if(tooltipMessage!==false){var tooltip=(new Tooltip).show(field,tooltipMessage);this.options.invalidField.call(this,field);return false;} this.options.validField.call(this,field);return true;}} return Validation;})();var ContactForm=function(rootElement,options){this.defaults={baseUrl:"/",classSurfix:"bcf-",hasEditor:false,editorElement:"bcf-message-editor",editorIconPath:"editor-toolbar.png",translateText:{"file.invalid":"This type of file is not allowed.","file.excessSize":"File is too large (max 5MB per file).","file.excessQuantity":"Maximum 5 files are allowed.","link.invalidUrl":"Please enter your valid url address","link.formTitle":"Edit Link","link.labelDisplayText":"Text to display","link.labelToURL":"Link to URL","link.buttonRemove":"Remove","dragdrop.zone":"Drop file here..","button.submit":"Submit",},demo:false} this.options=Core.defaults(options||{},this.defaults);this.options.translateText=Core.defaults(options.translateText||this.defaults.translateText,this.defaults.translateText);CLASS_SURFIX=this.options.classSurfix;ELEMENTS.Root=rootElement;ELEMENTS.Wrapper=Sly("."+CLASS_SURFIX+"wrapper").find(ELEMENTS.Root);if(true===this.options.hasEditor){EDITOR_ELEMENT=this.options.editorElement;this.Editor=EDITOR=new bcfEditor({iconsPath:this.options.editorIconPath,baseUrl:this.options.baseUrl,translateText:this.options.translateText,demo:this.options.demo}).panelInstance(EDITOR_ELEMENT,{hasPanel:true}).bcfInstances[0];};this.initialize();} ContactForm.prototype={initialize:function(){var _this=this;ELEMENTS.ContactForm=Sly("."+this.options.classSurfix+"contact-form").find(ELEMENTS.Root);if(this.options.demo)return false;ELEMENTS.Overlay=document.createElement("div");ELEMENTS.Overlay.setAttribute("class",this.options.classSurfix+"lightbox-overlay");Core.addEvent("click",ELEMENTS.Overlay,function(){_this.hide();});Core.addEvent("keypress",document,function(e){if(27===e.keyCode)_this.hide();});ELEMENTS.Root.appendChild(ELEMENTS.Overlay);},onshow:function(){},show:function(){var _this=this;this.updatePosition();setTimeout(function(){ELEMENTS.Root.style.zIndex=99998;ELEMENTS.Wrapper.style.opacity=0;new Animation.morph(ELEMENTS.Wrapper,{top:"50%"},{delay:0,duration:380},Animation.FX.sinusoidalEaseInOut,null,null,function(){}).concat(ELEMENTS.Wrapper,{opacity:1},{delay:0,duration:200},Animation.FX.quadraticEaseIn,null,null,function(){}).concat(ELEMENTS.Overlay,{opacity:1},{delay:0,duration:200},Animation.FX.quadraticEaseIn,function(){ELEMENTS.Overlay.style.display="block";},null,function(){}).start();_this.onshow.call(this);},0);},onhide:function(){},hide:function(){var _this=this;new Animation.morph(ELEMENTS.Wrapper,{opacity:0},{delay:0,duration:250},Animation.FX.quadraticEaseOut,null,null,function(){ELEMENTS.Wrapper.style.top=0;}).concat(ELEMENTS.Overlay,{opacity:0},{delay:0,duration:250},Animation.FX.quadraticEaseOut,null,null,function(){ELEMENTS.Overlay.style.display="none";ELEMENTS.Root.style.display="none";ELEMENTS.Root.style.zIndex=-1;}).start();_this.onhide.call(this);},updatePosition:function(){ELEMENTS.Root.style.display="block";return setTimeout(function(){var _mLeft=-(parseInt(window.getComputedStyle(ELEMENTS.Wrapper,null)["width"])/2),_mTop=-(parseInt(window.getComputedStyle(ELEMENTS.Wrapper,null)["height"])/2);ELEMENTS.Wrapper.style.marginLeft=_mLeft+"px";ELEMENTS.Wrapper.style.marginTop=_mTop+"px";},0);},clearMessages:function(){if(this.Editor) this.Editor.setContent("");else Sly("#"+this.options.classSurfix+"message-editor").find(ELEMENTS.ContactForm).value="";if(!this.Editor)return false;var attachButton=this.Editor.ne.bcfPanel.findButton("attach");if(attachButton)attachButton.clearAttachments();},takeSubmitAction:function(options){return(function(_this,_v){Core.addEvent("click",Sly("[rel='submit']").find(ELEMENTS.ContactForm),function(e){_v.validate();return false;});var fields=Sly("."+_this.options.classSurfix+"field").search(ELEMENTS.ContactForm);for(var i=fields.length-1;i>=0;i--){Core.addEvent("keyup",fields[i],function(e){Core.addEvent("blur",this,function(e){_v.validateField(this);});});};return false;})(this,new Validation(options.validate||{}));}} return ContactForm;})();var Ajax={toParams:function(o){if(typeof o==='string'){return o;} var pieces=[];for(var key in o){pieces.push(encodeURIComponent(key)+'='+encodeURIComponent(o[key]));} return pieces.join('&');},request:function(params){var Request;var requestPrepare=function(){if(window.XMLHttpRequest){Request=new XMLHttpRequest();if(Request.overrideMimeType){Request.overrideMimeType('text/html');}}else if(window.ActiveXObject){try{Request=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{Request=new ActiveXObject('Microsoft.XMLHTTP');}catch(er){}}} if(!Request){console.log('Could not create a XMLHttpRequest instance.');} Request.onreadystatechange=function(e){if(Request.readyState===1){(params.load||function(){})();}else if(Request.readyState===4){var re=Request.responseText;if(params.dataType==='json'){try{re=JSON.parse(re);}catch(e){}} if((Request.status>199&&Request.status<300)||Request.status===304){(params.success||function(){})(re,Request.status);}else{(params.error||function(){})(Request.status,re);}} params.always=params.always||function(){};try{params.always(Request.readyState,Request.status,re);}catch(e){params.always(Request.readyState);}};};params.raw=params.raw||false;if(!params.raw)params.data=Ajax.toParams(params.data||{});params.async=params.async||true;requestPrepare();if(params.type==='POST'){Request.open('POST',params.url,params.async,Ajax.username,Ajax.password);if(params.contentType) Request.setRequestHeader('Content-type',params.contentType+"; charset="+(params.charset||'utf-8'));else if(false!==params.contentType) Request.setRequestHeader('Content-type','application/x-www-form-urlencoded; charset='+(params.charset||'utf-8'));Request.send(params.data);}else{Request.open('GET',params.url+((typeof params.data!=='undefined')?(params.url.match(/\?/)?'&':'?')+params.data:''),params.async,Ajax.username,Ajax.password);Request.setRequestHeader('X-Requested-With','XMLHttpRequest');Request.send();} return Request;}};var BetterContactForm=function(options){this.defaults={buttonText:JSON.stringify('Contactati-ne').replace(/"|\\/g,"")||"Contact Us",buttonTop:"30%"||"30%",language:String("ro_RO")||"en_US",textData:JSON.parse("{\"Contact Us\":\"Contactati-ne\",\"Your name\":\"Numele d-voastra\",\"Your email address\":\"Adresa de e-mail\",\"Your phone\":\"Numarul de telefon\",\"Your company\":\"Compania\",\"Your website\":\"Websiteul d-voastra\",\"Subject\":\"Subiect\",\"Message..\":\"Mesaj..\",\"Please enter your name\":\"Introduceti numele\",\"Please enter a valid email address\":\"Introduceti o adresa de email valida\",\"Please enter your phone\":\"Introduceti numarul de telefon\",\"Please enter your company\":\"Introduceti compania\",\"Please enter your website\":\"Introduceti websiteul d-voastra\",\"Please enter subject\":\"Introduceti subiectul\",\"Please select a department\":\"V\\u0103 rug\\u0103m s\\u0103 selecta\\u021bi un departament\",\"Don't you have anything to say?\":\"Nu ai nimic de spus?\",\"Send\":\"Trimite\",\"Dear\":\"Stimate\",\"Customer\":\"Client\",\"Thank you for contacting us.\":\"Multumim ca ne-ai contactat.\",\"Your enquiry has been submitted and we will be in touch with you as soon as possible.\":\"Mesajul tau a fost trimis ,iti vom raspunde in cel mai scurt timp.\",\"Close\":\"Inchide\",\"New Message from\":\"Mesaj nou de la\",\"To\":\"To\",\"Department..\":\"Department ..\",\"This type of file is not allowed.\":\"Acest tip de fi\\u0219ier nu este permis .\",\"File is too large (max 5MB per file).\":\"Fi\\u0219ier este prea mare ( max 5MB pe fi\\u0219ier ) .\",\"Maximum 5 files are allowed.\":\"Maxim 5 imagini sunt permise .\",\"Please enter your valid url address\":\"Va rugam sa introduceti adresa dvs. URL valid\\u0103\",\"Edit Link\":\"Edit Link\",\"Link to URL\":\"Link-ul de URL\",\"Text to display\":\"Text pentru a afi\\u0219a\",\"Drop file here..\":\"Va rugam sa introduceti adresa dvs. URL valid\\u0103\",\"Submit\":\"prezenta\",\"Remove\":\"prezenta\"}")};this.options=Core.defaults(options||{},this.defaults);this.baseUrl="http://bettercontactform.com/contact";this._arabic=["fa_IR","iw_IL","ku_TR"];this.orientation=Boolean(this._arabic.indexOf(this.options.language)in this._arabic);this.classSurfix="bcf-";this.elements={Root:null,Wrapper:null,Content:null,CloseButton:null,HeadTitle:null,ContactForm:null,SuccessInform:null,Logo:null,TriggerButton:null,TriggerButtonImage:null,TriggerRels:[],};this.ContactForm=null;this.initializeComponents();this.initialize();} BetterContactForm.prototype={initializeComponents:function(){var _this=this;this.elements.Root=Sly("#"+this.classSurfix+_ID.substring(0,7)).find("body")||document.createElement("div");this.elements.Root.setAttribute("id",this.classSurfix+_ID.substring(0,7));this.elements.Wrapper=document.createElement("div");Core.addClass(this.elements.Wrapper,this.classSurfix+"wrapper");this.elements.Wrapper.style.opacity=0;this.elements.Root.appendChild(this.elements.Wrapper);this.elements.Content=document.createElement("div");Core.addClass(this.elements.Content,this.classSurfix+"content");this.elements.Wrapper.appendChild(this.elements.Content);this.elements.CloseButton=document.createElement("a");this.elements.CloseButton.setAttribute("href","javascript:void(0)");Core.addClass(this.elements.CloseButton,this.classSurfix+"button-close");Core.addClass(this.elements.CloseButton,this.classSurfix+"orientation");this.elements.CloseButton.innerHTML=(function(span){span.innerHTML=this.options.textData["Close"]||"Close";return span.outerHTML;}).call(this,document.createElement("span")).toString();this.elements.Content.appendChild(this.elements.CloseButton);this.elements.HeadTitle=document.createElement("h2");Core.addClass(this.elements.HeadTitle,this.classSurfix+"head-title");this.elements.HeadTitle.innerHTML=this.options.buttonText||this.options.textData["Contact Us"];this.elements.Content.appendChild(this.elements.HeadTitle);this.elements.ContactForm=document.createElement("form");this.elements.ContactForm.setAttribute("id",this.classSurfix+"contact-form");this.elements.ContactForm.setAttribute("method","post");this.elements.ContactForm.setAttribute("data-orientation",this.orientation?"right":"left");Core.addClass(this.elements.ContactForm,this.classSurfix+"contact-form");this.elements.ContactForm.innerHTML="