eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(5($){$.1n.1N({1g:5(26,3){6 1Q=X 26=="2e";3=$.1N({},$.Q.2F,{16:1Q?26:J,7:1Q?J:26,1Z:1Q?$.Q.2F.1Z:10,K:3&&!3.1R?10:4Z},3);3.29=3.29||5(e){a e};3.23=3.23||3.2P;a o.N(5(){2O $.Q(o,3)})},w:5(20){a o.1a("w",20)},1u:5(20){a o.1f("1u",[20])},2N:5(){a o.1f("2N")},2L:5(3){a o.1f("2L",[3])},2K:5(){a o.1f("2K")}});$.Q=5(g,3){6 F={3F:38,31:40,3i:46,3l:9,3A:13,3K:27,3S:4X,2Z:33,3b:34,3d:8};6 1Y=J;4(3.1t!=J&&X 3.1t=="5"){1Y=3.1t}6 $g=$(g).4T("1g","4R").R(3.3G);6 1l;6 1e="";6 1J=$.Q.2X(3);6 1h=0;6 22;6 11={1G:p};6 h=$.Q.3f(3,g,2E,11);6 1V;$.2C.3o&&$(g.3v).1a("4Q.1g",5(){4(1V){1V=p;a p}});$g.1a(($.2C.3o?"4P":"4M")+".1g",5(u){1h=1;22=u.3I;4L(u.3I){Y F.3F:4(h.E()){u.1E();h.2W()}j{Z(0,y)}W;Y F.31:4(h.E()){u.1E();h.36()}j{Z(0,y)}W;Y F.2Z:4(h.E()){u.1E();h.37()}j{Z(0,y)}W;Y F.3b:4(h.E()){u.1E();h.39()}j{Z(0,y)}W;Y 3.1m&&$.1B(3.S)==","&&F.3S:Y F.3l:Y F.3A:4(2E()){u.1E();1V=y;a p}W;Y F.3K:h.17();W;4J:2y(1l);1l=2w(Z,3.1Z);W}}).2u(5(){1h++}).4I(5(){1h=0;4(!11.1G){3p()}}).3r(5(){4(3.3u){4(!h.E()){Z(0,y)}}j{4(1h++>1&&!h.E()){Z(0,y)}}}).1a("1u",5(){6 1n=(2d.f>1)?2d[1]:J;5 2t(q,7){6 w;4(7&&7.f){1k(6 i=0;i<7.f;i++){4(7[i].w.M()==q.M()){w=7[i];W}}}4(X 1n=="5")1n(w);j $g.1f("w",w&&[w.7,w.e])}$.N(1d($g.L()),5(i,e){2s(e,2t,2t)})}).1a("2N",5(){1J.1r()}).1a("2L",5(){$.1N(y,3,2d[1]);4("7"2S 2d[1])1J.1A()}).1a("2K",5(){h.21();$g.21();$(g.3v).21(".1g")});5 2E(){6 I=h.I();4(!I)a p;6 v=I.w;1e=v;4(3.1m){6 A=1d($g.L());4(A.f>1){6 35=3.S.f;6 1s=$(g).1j().D;6 2r,1L=0;$.N(A,5(i,1v){1L+=1v.f;4(1s<=1L){2r=i;a p}1L+=35});A[2r]=v;v=A.3e(3.S)}v+=3.S}$g.L(v);1w();$g.1f("w",[I.7,I.e]);a y}5 Z(4H,3g){4(22==F.3i){h.17();a}6 P=$g.L();4(!3g&&P==1e)a;1e=P;P=1y(P);4(P.f>=3.2o){$g.R(3.2n);4(!3.1T)P=P.M();2s(P,3q,1w)}j{1U();h.17()}};5 1d(e){4(!e)a[""];4(!3.1m)a[$.1B(e)];a $.4C(e.2m(3.S),5(1v){a $.1B(e).f?$.1B(1v):J})}5 1y(e){4(!3.1m)a e;6 A=1d(e);4(A.f==1)a A[0];6 1s=$(g).1j().D;4(1s==e.f){A=1d(e)}j{A=1d(e.2l(e.3y(1s),""))}a A[A.f-1]}5 1X(q,2k){4(3.1X&&(1y($g.L()).M()==q.M())&&22!=F.3d){$g.L($g.L()+2k.3y(1y(1e).f));$(g).1j(1e.f,1e.f+2k.f)}};5 3p(){2y(1l);1l=2w(1w,4B)};5 1w(){6 4A=h.E();h.17();2y(1l);1U();4(3.3j){$g.1u(5(w){4(!w){4(3.1m){6 A=1d($g.L()).1F(0,-1);$g.L(A.3e(3.S)+(A.f?3.S:""))}j{$g.L("");$g.1f("w",J)}}})}};5 3q(q,7){4(7&&7.f&&1h){1U();h.3H(7,q);1X(q,7[0].e);h.2i()}j{1w()}};5 2s(z,24,1t){4(!3.1T)z=z.M();6 7=1J.3M(z);4(7&&7.f){24(z,7)}j 4((X 3.16=="2e")&&(3.16.f>0)){6 1H={4z:+2O 4x()};$.N(3.1H,5(3P,28){1H[3P]=X 28=="5"?28():28});$.3V({4u:"4q",4p:"1g"+g.4o,2V:3.2V,16:3.16,7:$.1N({q:1y(z),4n:3.K},1H),24:5(7){6 1c=3.2c&&3.2c(7)||2c(7);1J.1K(z,1c);24(z,1c)}})}j{h.30();4(1Y!=J){1Y()}j{1t(z)}}};5 2c(7){6 1c=[];6 2g=7.2m("\\n");1k(6 i=0;i<2g.f;i++){6 B=$.1B(2g[i]);4(B){B=B.2m("|");1c[1c.f]={7:B,e:B[0],w:3.2a&&3.2a(B,B[0])||B[0]}}}a 1c};5 1U(){$g.1I(3.2n)}};$.Q.2F={3G:"4m",3a:"4j",2n:"4i",2o:1,1Z:4h,1T:p,1p:y,1S:p,1z:4g,K:4f,3j:p,1H:{},2q:y,2P:5(B){a B[0]},23:J,1X:p,C:0,1m:p,S:" ",3k:y,3u:p,29:5(e,z){a e.2l(2O 4e("(?![^&;]+;)(?!<[^<>]*)("+z.2l(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/3m,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","3m"),"<3n>$1</3n>")},1R:y,1M:4d,2v:y};$.Q.2X=5(3){6 7={};6 f=0;5 1p(s,2x){4(!3.1T)s=s.M();6 i=s.3t(2x);4(3.1S=="1v"){i=s.M().1u("\\\\b"+2x.M())}4(i==-1)a p;a i==0||3.1S};5 1K(q,e){4(f>3.1z){1r()}4(!7[q]){f++}7[q]=e}5 1A(){4(!3.7)a p;6 18={},3w=0;4(!3.16)3.1z=1;18[""]=[];1k(6 i=0,3x=3.7.f;i<3x;i++){6 U=3.7[i];U=(X U=="2e")?[U]:U;6 e=3.23(U,i+1,3.7.f);4(e===p)2B;6 1W=e.45(0).M();4(!18[1W])18[1W]=[];6 B={e:e,7:U,w:3.2a&&3.2a(U)||e};18[1W].2D(B);4(3w++<3.K){18[""].2D(B)}};$.N(18,5(i,e){3.1z++;1K(i,e)})}2w(1A,25);5 1r(){7={};f=0}a{1r:1r,1K:1K,1A:1A,3M:5(q){4(!3.1z||!f)a J;4(!3.16&&3.1S){6 15=[];1k(6 k 2S 7){4(k.f>0){6 c=7[k];$.N(c,5(i,x){4(1p(x.e,q)){15.2D(x)}})}}a 15}j 4(7[q]){a 7[q]}j 4(3.1p){1k(6 i=q.f-1;i>=3.2o;i--){6 c=7[q.43(0,i)];4(c){6 15=[];$.N(c,5(i,x){4(1p(x.e,q)){15[15.f]=x}});a 15}}}a J}}};$.Q.3f=5(3,g,h,11){6 H={G:"3Z"};6 m,l=-1,7,z="",2M=y,t,r;5 3Q(){4(!2M)a;t=$("<3X/>").17().R(3.3a).14("4w","3W").2R(2Q.3R).3Y(5(u){4($(o).3L(":E")){g.2u()}11.1G=p});r=$("<41/>").2R(t).42(5(u){4(19(u).3D&&19(u).3D.44()==\'3B\'){l=$("1x",r).1I(H.G).47(19(u));$(19(u)).R(H.G)}}).3r(5(u){$(19(u)).R(H.G);h();4(3.3k)g.2u();a p}).48(5(){11.1G=y}).49(5(){11.1G=p});4(3.C>0)t.14("C",3.C);2M=p}5 19(u){6 t=u.19;4a(t&&t.4b!="3B")t=t.4c;4(!t)a[];a t}5 1b(1o){m.1F(l,l+1).1I(H.G);3h(1o);6 2p=m.1F(l,l+1).R(H.G);4(3.1R){6 O=0;m.1F(0,l).N(5(){O+=o.1C});4((O+2p[0].1C-r.1D())>r[0].4k){r.1D(O+2p[0].1C-r.4l())}j 4(O<r.1D()){r.1D(O)}}};5 3h(1o){4(3.2v||(!3.2v&&!((1o<0&&l==0)||(1o>0&&l==m.1i()-1)))){l+=1o;4(l<0){l=m.1i()-1}j 4(l>=m.1i()){l=0}}}5 32(2z){a 3.K&&3.K<2z?3.K:2z}5 2U(){r.2T();6 K=32(7.f);1k(6 i=0;i<K;i++){4(!7[i])2B;6 2h=3.2P(7[i].7,i+1,K,7[i].e,z);4(2h===p)2B;6 1x=$("<1x/>").4r(3.29(2h,z)).R(i%2==0?"4s":"4t").2R(r)[0];$.7(1x,"3U",7[i])}m=r.4v("1x");4(3.2q){m.1F(0,1).R(H.G);l=0}4($.1n.3T)r.3T()}a{3H:5(d,q){3Q();7=d;z=q;2U()},36:5(){1b(1)},2W:5(){1b(-1)},37:5(){4(l!=0&&l-8<0){1b(-l)}j{1b(-8)}},39:5(){4(l!=m.1i()-1&&l+8>m.1i()){1b(m.1i()-1-l)}j{1b(8)}},17:5(){t&&t.17();m&&m.1I(H.G);l=-1},E:5(){a t&&t.3L(":E")},4y:5(){a o.E()&&(m.3O("."+H.G)[0]||3.2q&&m[0])},2i:5(){6 O=$(g).O();t.14({C:X 3.C=="2e"||3.C>0?3.C:$(g).C(),3E:O.3E+g.1C,2j:O.2j}).2i();4(3.1R){r.1D(0);r.14({3s:3.1M,4D:\'4E\'});4($.2C.4F&&X 2Q.3R.4G.3s==="1O"){6 2b=0;m.N(5(){2b+=o.1C});6 2f=2b>3.1M;r.14(\'4K\',2f?3.1M:2b);4(!2f){m.C(r.C()-3J(m.14("3C-2j"))-3J(m.14("3C-4N")))}}}},I:5(){6 I=m&&m.3O("."+H.G).1I(H.G);a I&&I.f&&$.7(I[0],"3U")},30:5(){r&&r.2T()},21:5(){t&&t.4O()}}};$.1n.1j=5(D,V){4(D!==1O){a o.N(5(){4(o.2A){6 12=o.2A();4(V===1O||D==V){12.4S("2G",D);12.h()}j{12.4U(y);12.4V("2G",D);12.4W("2G",V);12.h()}}j 4(o.3c){o.3c(D,V)}j 4(o.1P){o.1P=D;o.2Y=V}})}6 T=o[0];4(T.2A){6 2H=2Q.1j.4Y(),3z=T.e,2I="<->",2J=2H.3N.f;2H.3N=2I;6 1q=T.e.3t(2I);T.e=3z;o.1j(1q,1q+2J);a{D:1q,V:1q+2J}}j 4(T.1P!==1O){a{D:T.1P,V:T.2Y}}}})(50);',62,311,'|||options|if|function|var|data|||return||||value|length|input|select||else||active|listItems||this|false||list||element|event||result||true|term|words|row|width|start|visible|KEY|ACTIVE|CLASSES|selected|null|max|val|toLowerCase|each|offset|currentValue|Autocompleter|addClass|multipleSeparator|field|rawValue|end|break|typeof|case|onChange||config|selRange||css|csub|url|hide|stMatchSets|target|bind|moveSelect|parsed|trimWords|previousValue|trigger|autocomplete|hasFocus|size|selection|for|timeout|multiple|fn|step|matchSubset|caretAt|flush|cursorAt|failure|search|word|hideResultsNow|li|lastWord|cacheLength|populate|trim|offsetHeight|scrollTop|preventDefault|slice|mouseDownOnSelect|extraParams|removeClass|cache|add|progress|scrollHeight|extend|undefined|selectionStart|isUrl|scroll|matchContains|matchCase|stopLoading|blockSubmit|firstChar|autoFill|globalFailure|delay|handler|unbind|lastKeyPressCode|formatMatch|success||urlOrData||param|highlight|formatResult|listHeight|parse|arguments|string|scrollbarsVisible|rows|formatted|show|left|sValue|replace|split|loadingClass|minChars|activeItem|selectFirst|wordAt|request|findValueCallback|focus|scrollJumpPosition|setTimeout|sub|clearTimeout|available|createTextRange|continue|browser|push|selectCurrent|defaults|character|range|teststring|textLength|unautocomplete|setOptions|needsInit|flushCache|new|formatItem|document|appendTo|in|empty|fillList|dataType|prev|Cache|selectionEnd|PAGEUP|emptyList|DOWN|limitNumberOfItems|||seperator|next|pageUp||pageDown|resultsClass|PAGEDOWN|setSelectionRange|BACKSPACE|join|Select|skipPrevCheck|movePosition|DEL|mustMatch|inputFocus|TAB|gi|strong|opera|hideResults|receiveData|click|maxHeight|indexOf|clickFire|form|nullData|ol|substring|orig|RETURN|LI|padding|nodeName|top|UP|inputClass|display|keyCode|parseInt|ESC|is|load|text|filter|key|init|body|COMMA|bgiframe|ac_data|ajax|absolute|div|hover|ac_over||ul|mouseover|substr|toUpperCase|charAt||index|mousedown|mouseup|while|tagName|parentNode|180|RegExp|1000|100|400|ac_loading|ac_results|clientHeight|innerHeight|ac_input|limit|name|port|abort|html|ac_even|ac_odd|mode|find|position|Date|current|timestamp|wasVisible|200|map|overflow|auto|msie|style|crap|blur|default|height|switch|keydown|right|remove|keypress|submit|off|move|attr|collapse|moveStart|moveEnd|188|createRange|150|jQuery'.split('|'),0,{}));
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1};var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else date=options.expires;expires='; expires='+date.toUTCString()};var path=options.path?'; path='+(options.path):'',domain=options.domain?'; domain='+(options.domain):'',secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}};return cookieValue}};
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/9/2009
 * @author Ariel Flesler
 * @version 1.4.1
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
/**
 * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/11/2009
 * @author Ariel Flesler
 * @version 1.2.7
 **/
;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);
(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery);
(function($){$.tools.validator.localize('en',{'*':'Please correct this value','[required]':'This is a required field',':email':'Please enter a valid email address (test@test.com)',':url':'Please enter a valid URL (http://www.test.com)',':number':'Please enter a valid number in this field',':digits':'Please use numbers only in this field. please avoid spaces or other characters such as dots or commas',':username':'Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed',':date':'Please enter a valid date',':datetime':'Please enter a valid date and time',':time':'Invalid time','[max]':'Please enter a value greater than $1','[min]':'Please enter a value smaller than $1'});$.tools.dateinput.localize('en',{months:'January,February,March,April,May,June,July,August,September,October,November,December',shortMonths:'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec',days:'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday',shortDays:'Sun,Mon,Tue,Wed,Thu,Fri,Sat'});$(function(){$(':date').dateinput({format:'yyyy-mm-dd',firstDay:parseInt('0'),selectors:true,disabled:false,readonly:false,yearRange:[-99,99],change:function(event,date){var y=parseInt(this.getValue('yyyy')),m=parseInt(this.getValue('m'))-1,d=parseInt(this.getValue('d')),timestampOfDate=new Date(y,m,d).getTime()/1e3,timezoneOffset=new Date(y,m,d).getTimezoneOffset()*60;timestampOfDate-=timezoneOffset;var oldTimestamp=this.getInput().nextAll('input[type=hidden]').val();if(this.getInput().nextAll('input[type=time]').length>0&&oldTimestamp!=''&&parseInt(oldTimestamp)==oldTimestamp){var oldDate=new Date(oldTimestamp*1e3),hours=parseInt(oldDate.getUTCHours()),minutes=parseInt(oldDate.getUTCMinutes());timestampOfDate+=parseInt(hours*3600+minutes*60)};this.getInput().next('input[type=hidden]').val(timestampOfDate)}}).each(function(i){var initTimestamp=$(this).next('input[type=hidden]').val();if(initTimestamp!=''&&parseInt(initTimestamp)==initTimestamp){var initDatetime=new Date(parseInt(initTimestamp)*1e3),year=initDatetime.getUTCFullYear(),month=initDatetime.getUTCMonth(),day=initDatetime.getUTCDate();$(this).data('dateinput').setValue(year,month,day)}});$.tools.validator.fn('input:checkbox',function(input,value){checkboxes=input.parent().parent().find('input:checkbox');if(checkboxes.filter('.required_one').length>0)if(checkboxes.filter(':checked').length==0){return(input.filter('.required_one').length==0)?true:'Please select one of the below options'}else powermail_validator.data('validator').reset(checkboxes);return true});$(':range').rangeinput();$('.tx_powermail_pi1_form input:checkbox').click(function(){$(this).parent().parent().find('input:checkbox').blur();var checkid=$(this).attr('id'),valueid=checkid.replace(/check_/,'value_'),targetid=checkid.replace(/check_/,'');$('#'+targetid).val($(this).is(':checked')?$('#'+valueid).val():'')});$.tools.validator.fn('input[type=time]','This is a required field',function(input,value){if(value!=''&&!/\d\d:\d\d/.test(value)){return false}else{var time=value.split(':'),hour=parseInt(time[0]),minute=parseInt(time[1]);if(hour>23||hour<0||minute>59||minute<0)return false;if(input.prevAll('input.powermail_datetime').length>0){var oldDate=new Date(input.prev('input').val()*1e3),year=oldDate.getUTCFullYear(),month=oldDate.getUTCMonth(),day=oldDate.getUTCDate(),secondsToAdd=hour*3600+minute*60,timestamp=(new Date(year,month,day,hour,minute,0).getTime()/1e3),timezoneOffset=new Date(year,month,day,hour,minute,0).getTimezoneOffset()*60;input.prev('input').val(timestamp-timezoneOffset)};return true}});$('input[type=time]').addClass('powermail_time').each(function(i){if($(this).prevAll('input.powermail_datetime').length>0)if($(this).prev('input').val()!=''){var newDate=new Date(parseInt($(this).prev('input').val()*1e3)),h=parseInt(newDate.getUTCHours()),m=parseInt(newDate.getUTCMinutes());h=(h<10)?'0'+h:h;m=(m<10)?'0'+m:m;$(this).val(h+':'+m)}else $(this).attr('placeholder','00:00')});$.tools.validator.fn('select','',function(el,value){if(el.attr('multiple')){return value!=null?true:'Please select one of the below options'}else return value.length>0?true:''});if(!false)powermail_validator=$('.tx_powermail_pi1_form').validator({position:'top right',offset:[-5,-20],message:'<div><em/></div>',inputEvent:'blur',grouped:true,singleError:false,formEvent:'submit',onBeforeValidate:function(e,els){clearPlaceholderValue(e,els)},onBeforeFail:function(e,els,matcher){setPlaceholderValue(e,els,matcher)},onFail:function(e,els){}});var fakeTextarea=document.createElement('textarea'),textareaMaxlengthSupport=('maxlength'in fakeTextarea);if(!textareaMaxlengthSupport)$('textarea[maxlength]').each(function(){$(this).bind('keypress blur',function(){$(this).val($(this).val().substr(0,$(this).attr('maxlength')))})});var fakeInput=document.createElement('input'),placeHolderSupport=('placeholder'in fakeInput);clearPlaceholderValues=function(){if(!placeHolderSupport)$('input:text, textarea').each(function(i){if($(this).val()===$(this).attr('placeholder'))$(this).val('')})};clearPlaceholderValue=function(e,els){if(!placeHolderSupport){$(this).removeClass('placeholder');if(els.val()===els.attr('placeholder'))els.val('')}};setPlaceholderValue=function(e,els,matcher){if(!placeHolderSupport)if(els.val().length===0&&e.keyCode!=9&&els.attr('placeholder')!=undefined){els.val(els.attr('placeholder'));els.addClass('placeholder')}};if(!placeHolderSupport){$('input:text, textarea').each(function(i){if($(this).val().length===0){var originalText=$(this).attr('placeholder');$(this).val(originalText);$(this).addClass('placeholder');$(this).bind('focus',function(i){$(this).removeClass('placeholder');if($(this).val()===$(this).attr('placeholder'))$(this).val('')})}});$('form').bind('submit',function(){clearPlaceholderValues()});$(window).bind('unload',function(){clearPlaceholderValues()})};$('ul.powermail_multiplejs_tabs li a:first').addClass('act');if($.ui&&typeof($.ui.tabs)=='function'){$('.powermail_multiple_js .powermail_multiplejs_tabs_item a').each(function(id,item){var temp=item.href.split('#'),temp_last=temp[temp.length-1],search=/^tx\-powermail\-pi1\_fieldset/;if(search.test(temp_last))item.href='#'+temp_last});$('.powermail_multiple_js').tabs()}else $('ul.powermail_multiplejs_tabs').tabs('div.fieldsets > fieldset');$('ul.powermail_multiplejs_tabs li a').click(function(){$('ul.powermail_multiplejs_tabs li a').removeClass('act');$(this).addClass('act');if(!false)$(this).parent().parent().find('a').not('.current').each(function(id,item){var temp=item.href.split('#'),resetSelector=$('#'+temp[temp.length-1]+' :input');powermail_validator.data('validator').reset(resetSelector)})})})})(jQuery);
var countriesArr=["United Kingdom","Netherlands","Norway","Sweden","United States","Australia","Canada","Germany","Afghanistan","Åland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo-Brazzaville","Cook Islands","Costa Rica","Côte d’Ivoire","Croatia","Cuba","Curaçao","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroes","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong SAR of China","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao SAR of China","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","Northern Marianas","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Barthélemy","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","Spain","Sri Lanka","Sudan","Suriname","Svalbard","Swaziland","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","Uruguay","US Virgin Islands","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"];
var DL={config:{mailformContainer:'.csc-mailform',formFocusCont:'.mailform-focus',submitDisabled:'.mailform-disabled',productsTableContainer:'table.products-table',quoteformContainer:'#quoteform',defaultCurrency:'GBP'},init:function(config){if(config&&typeof (config)=='object')$.extend(DL.config,config);DL.setTrackerVars();DL.addStyles();DL.searchAutocomplete();DL.processForms();DL.mailForm();DL.setEqualCells();DL.productsNav();DL.initgalleryScroll();DL.quoteForm.process();DL.frontQuote.init();DL.initialized=true},setTrackerVars:function(){$("#quoteform").submit(function(){var emailStr=$(":input[name*=email]",this).val();_gaq.push(['_setCustomVar',1,'Contact',emailStr,1]);_gaq.push(['_trackPageview'])});$("#contactform").submit(function(){var emailStr=$("input[type=email]",this).val();_gaq.push(['_setCustomVar',1,'Contact',emailStr,1]);_gaq.push(['_trackPageview'])})},addStyles:function(){$(".news-latest-item:last").addClass("last")},searchAutocomplete:function(){$("#rzautocomplete-input").autocomplete("index.php?eID=dl_searchsuggest&language=0",{minChars:3,selectFirst:false,max:10,autoFill:0,delay:300,matchContains:1,scroll:1,selectFirst:1,multiple:0,multipleSeparator:", "});$("#rzautocomplete-input").result(function(event,data,formatted){$("#indexedsearch").submit()})},quoteForm:{process:function(){DL.quoteForm.populateInputs();$(".price-wrap",DL.config.quoteformContainer).filter(":empty").html('<span class="price">Price <strong>to be confirmed</strong></span>');$(":checkbox",DL.config.quoteformContainer).each(function(){if($(this).data("ischecked")===true)$(this).attr("checked","checked")});$(":checkbox",DL.config.quoteformContainer).change(DL.quoteForm.calc).change()},populateInputs:function(){$.each(["customerName","customerEmail","customerPhone","customerCountry","customerErpversion"],function(){var inputName=this.replace("customer","").toLowerCase();if($.cookie(this)){$(':input[name="tx_quoteform_quoteform['+inputName+']"]').val($.cookie(this));$.cookie(this,null)}})},calc:function(){var total=0,grandTotal=0,discount=0,price=0,currency=DL.config.defaultCurrency;$(":checkbox",DL.config.quoteformContainer).next('input[name*=prices]').attr("disabled","disabled");$("input:checked",DL.config.quoteformContainer).each(function(){$(this).next().removeAttr("disabled");price=$(this).next('input[name*=prices]').val();price=parseFloat(price);if(isNaN(price))price=0;total=total+price});var discountPercent=DL.quoteForm.getDiscountPercent(total);discount=total*discountPercent/100;grandTotal=total-discount;currency=$(".price em:eq(0)",DL.config.quoteformContainer).text();$("span.mark em").text(discountPercent+'%');$(".qf-total").text(total+' '+currency);$(".qf-discount").text(discount+' '+currency);$(".qf-grandtotal").html(grandTotal+' '+currency+'<em>ex. of VAT</em>');$('input[name="tx_quoteform_quoteform[total]"]').val(total);$('input[name="tx_quoteform_quoteform[discount]"]').val(discount);$('input[name="tx_quoteform_quoteform[grandtotal]"]').val(grandTotal);$('input[name="tx_quoteform_quoteform[currency]"]').val(currency)},getDiscountPercent:function(total){var discount=0,discountRules=$("#quoteform-product").data("discountrules"),discountRulesArr=discountRules.split(/[:;]/);for(var i=0,n=discountRulesArr.length;i<n;i=i+2)if(total>discountRulesArr[i])discount=discountRulesArr[i+1];return discount}},setEqualCells:function(){$('tr',DL.config.productsTableContainer).each(function(){var box_height=0;$(this).find('.cell-content').each(function(){if($(this).height()>box_height)box_height=$(this).height()});$(this).find('.cell-content').css({height:box_height+'px'})})},productsNav:function(){if($("#products-nav").length==0)return false;window.onload=function(){var scrollToSelector=window.location.hash;if(scrollToSelector.length>1)$.scrollTo(scrollToSelector,300)};var $navEl;$("#products-nav").append('<div id="products-nav-inner">');$(".ecommerce-logo img").each(function(){var elementId=$(this).attr('alt');elementId=elementId.replace(" ","_");$(this).parents('.ecommerce-logo').attr('id',encodeURI(elementId));$navEl=$(this).eq(0).clone();$navEl.width($(this).width()/2.2);$navEl.height($(this).height()/2.2);$navEl.data('anchor',elementId);$("#products-nav-inner").append($navEl)});$("#products-nav img").wrap("<a>");$("#products-nav a").each(function(){var locationStr=document.location.href;if(locationStr.indexOf('#')>0)locationStr=locationStr.substr(0,locationStr.indexOf('#'));var locationHash=$('img',this).data('anchor');$(this).attr('href',locationStr+'#'+encodeURI(locationHash))});$("#products-nav").hover(function(){$("#products-nav-inner").stop(true,true).slideDown(100)},function(){$("#products-nav-inner").stop(true,true).slideUp(100)});$("#products-nav").localScroll({easing:'swing',duration:500})},highlightTable:function(){$("table.products-table").delegate('td','mouseover mouseleave',function(e){if(e.type=='mouseover'){$(this).parent().addClass("hover");$("colgroup").eq($(this).index()).addClass("hover").css("background","blue")}else{$(this).parent().removeClass("hover");$("colgroup").eq($(this).index()).removeClass("hover").css("background","blue")}})},initgalleryScroll:function(){$(".small-logos .slides-holder").jCarouselLite({btnNext:".small-logos .btn-next",btnPrev:".small-logos .btn-prev",speed:300,mouseWheel:true,visible:7})},frontQuote:{init:function(){$("#mailformerp").change(function(){DL.frontQuote.toggleAdditionalOptions($(this))}).change()},dispatchSubmit:function(formObj){var goto=$("#redirect-table").data('defaultredirect'),ecommerceId=$("#mailformecommerce").prop('selectedIndex'),erpId=$("#mailformerp").prop('selectedIndex'),redirectId=erpId+'-'+ecommerceId;$("#redirect-table [data-redirectid]").each(function(){if(redirectId==$(this).data('redirectid'))goto=$(this).data('redirecturl')});$.cookie("customerName",$(":input[name=name]",formObj).val());$.cookie("customerEmail",$(":input[name=email]",formObj).val());$.cookie("customerPhone",$(":input[name=phone]",formObj).val());$.cookie("customerCountry",$(":input[name=country]",formObj).val());$.cookie("customerCountryIndex",$(":input[name=country]",formObj).prop('selectedIndex'));$.cookie("customerErpversion",$(":input[name*=erpversion]:visible",formObj).val());$.cookie("customerErpversionIndex",$(":input[name*=erpversion]:visible",formObj).prop('selectedIndex'));document.location.href=$('base').attr('href')+goto},toggleAdditionalOptions:function(erpObj){$("select[name^=erpversion]").hide();$("select[name^=erpversion]").hide();var selectedIndex=erpObj.prop('selectedIndex');if(selectedIndex>0)$("select[name^=erpversion]").eq(selectedIndex-1).show()}},mailForm:function(){var quoteFormName='intromailform';$(DL.config.submitDisabled).removeAttr("disabled");$("#intro-form #mailform, .footer-quote #mailform").removeAttr("onsubmit");$("#intro-form #mailform").attr('name',quoteFormName);$(".footer-quote #mailform").attr('name','footermailform');$("#intro-form #mailform, .footer-quote #mailform, #quoteform").submit(function(){var error=false;$('.mailform-required input[type="text"], .mailform-required textarea',$(this)).removeClass('error-field').each(function(){if($(this).val()==$(this).prop('defaultValue')){$(this).addClass('error-field');error=true};if($(this).val().length<2||$(this).val()==$(this).prop('defaultValue')){$(this).addClass('error-field');error=true};if($(this).is('input[name*=email]')&&!/^[a-z0-9_+.-]+\@([a-z0-9-]+\.)+[a-z0-9]{2,4}$/i.test($(this).val())){$(this).addClass('error-field');error=true}});$(".error").remove();$(".error-field").each(function(){var offset=$(this).offset(),messageOffsetLeft=offset.left+$(this).width()-10,messageOffsetTop=offset.top-23,fieldName=$(this).attr('title'),$errorMessage=$("<div class='error'><em></em><p>Please enter "+fieldName+"</p></div>");$errorMessage.appendTo("body").css({display:'none',position:'absolute',left:messageOffsetLeft,top:messageOffsetTop}).fadeIn()});if(!error&&$(this).attr('name')==quoteFormName){DL.frontQuote.dispatchSubmit($(this));return false};return !error})},processForms:function(){$.each(countriesArr,function(i,val){$("#mailformcountry, #tx-quoteform-country").append('<option value="'+val+'">'+val+'</option>')});$('input[type=text], textarea',DL.config.formFocusCont).each(function(){var defaultValue=this.value;$(this).attr('title',defaultValue);$(this).focus(function(){if(this.value==defaultValue)this.value=''});$(this).blur(function(){if(this.value=='')this.value=defaultValue})})},roundNumber:function(number,decimals){var newnumber=new Number(number+'').toFixed(parseInt(decimals));return parseFloat(newnumber)}};$(document).ready(function(){DL.init()});

