/*
Consolid8 Logistics JavaScript
(C) Optimalworks.net
*/
if(!owl){var owl={};owl.Version=0.1;owl.UserAgent=navigator.userAgent.toLowerCase();owl.Browser={IE:/msie/.test(owl.UserAgent)&&!/opera/.test(owl.UserAgent),Mozilla:/mozilla/.test(owl.UserAgent)&&!/(compatible|webkit)/.test(owl.UserAgent),Opera:/opera/.test(owl.UserAgent),Safari:/webkit/.test(owl.UserAgent),Konqueror:/konqueror/.test(owl.UserAgent)};owl.Browser.Version=owl.UserAgent.replace(/^.+[ox|ra|on|or][\/: ]/,"");if(owl.Browser.Version.indexOf("msie")>=0){owl.Browser.Version=owl.Browser.Version.replace(/^.+[ie][\/: ]/,"")}owl.Browser.Version=owl.Browser.Version.replace(/([^\d.].+$)/,"");owl.Browser.VerNum=parseFloat(owl.Browser.Version);owl.Number=function(){var A=/[^0-9-.]/g;function C(E){var F=String(E);F=F.replace(A,"");var D=parseInt(F,10);return(isNaN(D)?0:D)}function B(D){if(isNaN(D)){D=0}return(Math.min(1,Math.max(-1,D)))}return{toInt:C,Sign:B}}();owl.String=function(){var E=/^\s*|\s*$/g;var B=/[^\w|\s|@|&|.|,|!|%|(|)|+|-]/g;var A=/[_|\s]+/g;function F(H){return String(H).replace(E,"")}function G(H){return F(String(H).replace(B,"").replace(A," "))}function C(J,I,H){J=String(J);I=owl.Number.toInt(I);if(typeof H=="undefined"){H=" "}else{H=String(H);if(H.length<1){H=" "}}while(J.length<I){J=H+J}return J}function D(K,J){if(typeof J=="string"){J=[J]}if(J&&J.length){for(var I=0,H=J.length;I<H;I++){K=K.replace(new RegExp("(^|[^%])%"+I+"([^0-9]|$)","g"),"$1"+J[I]+"$2")}}return K}return{Trim:F,Clean:G,Pad:C,Format:D}}();if(owl&&!owl.Array){owl.Array=function(){function B(E){return !!(E&&E.constructor==Array)}function A(F,E){F[F.length]=E}function C(F){var E=null;if(F.length>0){E=F[F.length-1];F.length--}return E}function D(E,F){return(E?(B(E)?E:[E]):(typeof F=="undefined"?[]:(B(F)?F:[F])))}return{Is:B,Push:A,Pop:C,Make:D}}()}owl.Each=function(F,D){if(F.length){for(var C=0,B=F.length,A=F[0];C<B&&D(A,C)!==false;A=F[++C]){}}else{for(var E in F){if(D(F[E],E)===false){break}}}};owl.Property=function(){function A(F){if(!F.owlP){F.owlP={};F.owlP.length=0}}function D(G,F,H){owl.Each(owl.Array.Make(G),function(I){A(I);I.owlP[F]=H;I.owlP.length++})}function E(G,F){return(B(G,F)?G.owlP[F]:null)}function B(G,F){return(G&&G.owlP&&typeof G.owlP[F]!="undefined")}function C(G,F){owl.Each(owl.Array.Make(G),function(H){if(H.owlP&&H.owlP[F]){delete H.owlP[F];H.owlP.length--;if(H.owlP.length==0){H.owlP=null}}})}return{Set:D,Get:E,Exists:B,Delete:C}}();owl.Object=function(){function Exists(object,item){return(typeof object[item]!="undefined")}function PropertyExists(object,item){var type=typeof (object[item]);return(type!="undefined"&&type!="function")}function MethodExists(object,item){return(typeof object[item]=="function")}function Serialize(object){var json=[];owl.Each(object,function(v,k){if(typeof v=="undefined"){v="null"}else{if(typeof v=="string"){v='"'+v+'"'}else{if(typeof v=="object"){if(!v){v="null"}else{if(owl.Array.Is(v)){v="["+String(v)+"]"}else{v=Serialize(v)}}}}}owl.Array.Push(json,k+":"+v)});return"{"+json.join()+"}"}function DeSerialize(serial){if(serial===""){serial='""'}eval("var ret = "+serial+";");return ret}return{Exists:Exists,PropertyExists:PropertyExists,MethodExists:MethodExists,Serialize:Serialize,DeSerialize:DeSerialize}}()}if(owl&&!owl.Css){owl.Css=function(){function B(G,F){var H=true;if(F){owl.Each(owl.Array.Make(G),function(I){var J=" "+I.className+" ";H=(J.indexOf(" "+F+" ")>=0);return H})}return H}function E(G,F){owl.Each(owl.Array.Make(G),function(H){var I=" "+H.className+" ";if(I.indexOf(" "+F+" ")<0){I+=F;H.className=owl.String.Trim(I)}})}function D(G,F){owl.Each(owl.Array.Make(G),function(H){var I="";if(F){I=" "+H.className+" ";I=owl.String.Trim(I.replace(new RegExp(" "+F+" ","gi")," "))}H.className=I})}function A(I,G,F){G=Math.min(Math.max(G,0),99.999999);var H=G/100;owl.Each(owl.Array.Make(I),function(J){if(F!==false){if(J.style.visibility=="hidden"){if(G>0){J.style.visibility="visible"}}else{if(G==0){J.style.visibility="hidden"}}}J.style.opacity=H;J.style.MozOpacity=H;J.style.filter="alpha(opacity:"+G+")";J.style.KHTMLOpacity=H})}function C(F,H){var G="";if(F){if(document.defaultView&&document.defaultView.getComputedStyle){G=document.defaultView.getComputedStyle(F,"").getPropertyValue(H)}else{if(F.currentStyle){H=H.replace(/\-(\w)/g,function(I,J){return J.toUpperCase()});G=F.currentStyle[H]}}}return G}return{ClassExists:B,ClassApply:E,ClassRemove:D,Opacity:A,ComputedStyle:C}}()}if(owl&&owl.Browser&&owl.Browser.IE&&Math.floor(owl.Browser.VerNum)==6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}if(owl&&!owl.Image){owl.Image=function(){function A(D,E){var C=new Image();C.src=D;if(E){if(C.complete){E(C)}else{C.onload=function(){E(C)}}}}function B(D,E,C){if(owl.Browser.IE&&owl.Browser.VerNum>=5.5&&owl.Browser.VerNum<7){if(!C){C="crop"}owl.Each(owl.Array.Make(D),function(F){F.style.backgroundImage="none";F.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+E+"', sizingMethod='"+C+"')"})}}return{Load:A,IEpng:B}}()}if(owl&&owl.Css&&!owl.Dom&&document.getElementById&&document.getElementsByTagName){owl.Dom=function(){var S=1;var P=2;var R=3;var L=8;var K=/[^\w|\s|-|#|\.|,|\[|\]|=|~|!|*]/g;var H=/\s+/g;var Q=/^[^#|\.|\[]*/;var F=/#[^#|\.|\[]+/;var G=/\.[^#|\.|\[]+/;var I=/\[(.+)\]/;var M=/([~|!|*]*=)/;var N=/(^[^=|~|!|*])+/;var U=owl.Array,W=[document];function E(d,Y){Y=U.Make(Y,W);d=owl.String.Trim(String(d).replace(K,"").replace(H," "));var X=[],h=d.split(","),j,c,i,f,g,b;for(i=0,f=h.length;i<f;i++){j=owl.String.Trim(h[i]);var Z=Y.slice();c=j.split(" ");for(g=0,b=c.length;g<b;g++){if(Y.length>0){Z=J(c[g],Z)}}owl.Each(Z,function(a){U.Push(X,a)})}return X}function J(d,l){var h=[],r,i,k,a,g,q,f,b;var c={Tag:"",ID:"",Class:"",AttribCheck:function(){return true}};c.Tag=Q.exec(d);c.Tag=(c.Tag?c.Tag[0].toLowerCase():"*");if(c.Tag==""){c.Tag="*"}c.ID=F.exec(d);c.ID=(c.ID?c.ID[0].substr(1):"");c.Class=G.exec(d);c.Class=(c.Class?c.Class[0].substr(1):"");var m=I.exec(d);if(m){m=m[1];var Y,o=null,Z=M.exec(m);Z=(Z?Z[1]:null);if(Z){var j=m.indexOf(Z);Y=m.substr(0,j);o=m.substr(j+Z.length)}else{Y=m}c.AttribCheck=function(p){var n;switch(Y){case"class":n=p.className;break;case"for":n=p.htmlFor;break;default:n=p.getAttribute(Y);break}n=(n?n:"");return((n==""&&(!Z||Z=="!="))||(!Z||((Z=="="&&n==o)||(Z=="!="&&n!=o)||(Z=="*="&&n.indexOf(o)>=0)||(Z=="~="&&(" "+n+" ").indexOf(" "+o+" ")>=0))))}}for(k=0,a=l.length;k<a;k++){r=[];if(c.ID){i=document.getElementById(c.ID);if(i&&(c.Tag=="*"||i.nodeName.toLowerCase()==c.Tag)&&(!c.Class||owl.Css.ClassExists(i,c.Class))&&c.AttribCheck(i)){r[0]=i}}else{var X=function(n){return((c.Tag=="*"||n.nodeName.toLowerCase()==c.Tag)&&(c.Class==""||owl.Css.ClassExists(n,c.Class))&&c.AttribCheck(n))};if(c.Tag=="*"){r=O(l[k],0,X)}else{i=l[k].getElementsByTagName(c.Tag);for(f=0,b=i.length;f<b;f++){if(X(i[f])){r[r.length]=i[f]}}}}for(g=0,q=r.length;g<q;g++){h[h.length]=r[g]}}return h}function O(Z,X,b){var a=function(g,i){var h=[],f,c,d;if(!i){i=1}for(f=0,c=g.childNodes.length;f<c;f++){d=g.childNodes[f];if(d.nodeType==S&&d.nodeName!="!"){if(!b||b(d)){h[h.length]=d}if(g.childNodes.length>0&&(!X||i<X)){h=h.concat(a(d,i++))}}}return h};Z=U.Make(Z,W);var Y=[];owl.Each(Z,function(c){Y=Y.concat(a(c))});return Y}function D(Y,X){var Z=[];X=(X.toLowerCase()||"div");owl.Each(U.Make(Y),function(b,a){while(b.nodeName.toLowerCase()!=X&&b.parentNode){b=b.parentNode}Z[a]=(b.nodeName.toLowerCase()==X?b:null)});if(!owl.Array.Is(Y)){Z=Z[0]}return Z}function A(a,Z,Y,X){a=U.Make(a,W);Z=U.Make(Z,W);owl.Each(Z,function(f,d){if(X){C(f)}var g=Math.min(d,a.length-1);for(var c=0,b=a[g].childNodes.length;c<b;c++){f.appendChild(a[g].childNodes[c].cloneNode(true))}if(Y){C(a[g])}else{V(f)}})}function V(X){owl.Each(U.Make(X,W),function(Y){O(Y,null,function(Z){if(Z.id){Z.removeAttribute("id")}return true})})}function C(X){owl.Each(U.Make(X,W),function(Y){while(Y.lastChild){Y.removeChild(Y.lastChild)}})}function B(Y){var Z=false;for(var a=0,X=Y.childNodes.length;a<X&&!Z;a++){Z=(Y.childNodes[a].nodeType==R?Y.childNodes[a]:B(Y.childNodes[a]))}return Z}function T(X,Z){var Y=(typeof Z!="undefined");Z=(Y?(typeof Z=="string"?[Z]:Z):"");owl.Each(U.Make(X,W),function(c,b){var a=B(c);if(Y){var d=Z[Math.min(b,Z.length-1)];if(a){a.nodeValue=d}else{a=c.appendChild(document.createTextNode(d))}}else{if(a){Z+=(Z==""?"":"\n")+a.nodeValue}}});return(Y?true:Z)}return{ElementNode:S,AttributeNode:P,TextNode:R,CommentNode:L,Get:E,Descendents:O,Ancestors:D,Clone:A,RemoveIDs:V,RemoveChildren:C,Text:T}}()}if(owl&&!owl.Event){owl.Event=function(B,D,C,A){B=owl.Array.Make(B,[window]);C=(typeof C=="function"?C:null);A=(A||A==0?owl.Number.toInt(A):null);var E=[];owl.Each(B,function(F){E[E.length]=owl.EventRegister.Add(F,D,C,A)});this.Detach=function(){for(var G=0,F=B.length;G<F;G++){owl.EventRegister.Detach(B[G],D,E[G],true)}}};owl.EventRegister=function(){var B=[],I=[],A=[],E=0,F=false;var G="EventRegister";function K(O,Q,P,N){var L=owl.Property.Get(O,G);if(!L){L={};B[B.length]=O}if(!L[Q]){E++;I[E]=[];L[Q]=E;owl.Property.Set(O,G,L);var M=O["on"+Q];if(M){new owl.Event(O,Q,M)}O["on"+Q]=owl.EventRegister.Handler;if(E==1){new owl.Event(window,"unload",owl.EventRegister.CleanUp,1e+100)}}var R=L[Q];var S=I[R].length;I[R][S]={Handler:P,Priority:N};C(O,Q,R);return{Reg:R,Func:S}}function C(M,O,P){var L=[];for(var Q=0,N=I[P].length;Q<N;Q++){if(I[P][Q].Handler!=null){L[L.length]={Index:Q,Priority:I[P][Q].Priority}}}if(L.length>0){L.sort(function(S,R){return S.Priority-R.Priority})}else{M["on"+O]=null;delete M.owlP[G][O];L=null}A[P]=L;F=false}function D(O){var M=true,Q=new owl.EventInformation(this,O);if(Q.Index&&Q.Index.Reg){var L=A[Q.Index.Reg].slice();for(var P=0,N=L.length;P<N;P++){Q.Index.Func=L[P].Index;if(Q.AllowNext&&I[Q.Index.Reg][Q.Index.Func].Handler){M&=(I[Q.Index.Reg][Q.Index.Func].Handler(Q)!==false)}}}if(F){C(Q.Element,Q.Type,Q.Index.Reg)}return M}function H(N,O,L,M){I[L.Reg][L.Func].Handler=null;if(M){C(N,O,L.Reg)}else{F=true}}function J(){for(var O=0,N=B.length,L=B[0];O<N;L=B[++O]){for(var M in owl.Property.Get(L,G)){L["on"+M]=null}owl.Property.Delete(L,G)}B=null;I=null;A=null}return{Namespace:G,Add:K,Handler:D,Detach:H,CleanUp:J}}();owl.EventInformation=function(A,B){this.Element=A;this.Event=(B?B:window.event);if(this.Event){this.Type=this.Event.type.toLowerCase();this.Target=(this.Event.target?this.Event.target:this.Event.srcElement);this.Index={Reg:this.Element.owlP[owl.EventRegister.Namespace][this.Type],Func:null};this.AllowNext=true}};owl.EventInformation.prototype.Key=function(){if(!this.KeySet){this.KeySet={Pressed:"",Function:"",Shift:this.Event.shiftKey,Ctrl:this.Event.ctrlKey,Alt:this.Event.altKey};if(owl.EventKey.test(this.Type)){var B=this.Event.keyCode;var A=(typeof this.Event.charCode!="undefined"?this.Event.charCode:null);if(A>0){this.KeySet.Pressed=String.fromCharCode(A)}else{if(owl.EventCK[B]&&(A!=null||B<32||(this.Type!="keypress"||(!this.Shift&&B<112&&B!=35&&B!=39&&B!=45&&B!=46)))){this.KeySet.Function=owl.EventCK[B]}else{if(B>=32){this.KeySet.Pressed=String.fromCharCode(B)}}}}}return this.KeySet};owl.EventInformation.prototype.Mouse=function(){if(!this.MouseSet){this.MouseSet={X:0,Y:0};if(owl.EventMouse.test(this.Type)){this.MouseSet.X=(this.Event.pageX?this.Event.pageX:this.Event.clientX+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft));this.MouseSet.Y=(this.Event.pageY?this.Event.pageY:this.Event.clientY+Math.max(document.documentElement.scrollTop,document.body.scrollTop))}}return this.MouseSet};owl.EventInformation.prototype.Detach=function(){owl.EventRegister.Detach(this.Element,this.Type,this.Index)};owl.EventInformation.prototype.StopHandlers=function(){this.AllowNext=false};owl.EventInformation.prototype.StopPropagation=function(){if(this.Event.stopPropagation){this.Event.stopPropagation()}this.Event.cancelBubble=true};owl.EventInformation.prototype.StopDefaultAction=function(){if(this.Event.preventDefault){this.Event.preventDefault()}this.Event.returnValue=false};owl.EventKey=/^key/i;owl.EventMouse=/mouse|click/i;owl.EventCK=[];owl.EventCK[8]="backspace";owl.EventCK[9]="tab";owl.EventCK[13]="enter";owl.EventCK[19]="break";owl.EventCK[27]="esc";owl.EventCK[33]="pageup";owl.EventCK[34]="pagedown";owl.EventCK[35]="end";owl.EventCK[36]="home";owl.EventCK[37]="left";owl.EventCK[38]="up";owl.EventCK[39]="right";owl.EventCK[40]="down";owl.EventCK[45]="insert";owl.EventCK[46]="delete";owl.EventCK[112]="f1";owl.EventCK[113]="f2";owl.EventCK[114]="f3";owl.EventCK[115]="f4";owl.EventCK[116]="f5";owl.EventCK[117]="f6";owl.EventCK[118]="f7";owl.EventCK[119]="f8";owl.EventCK[120]="f9";owl.EventCK[121]="f10";owl.EventCK[122]="f11";owl.EventCK[123]="f12";owl.EventCK[144]="numlock";owl.EventCK[145]="scrolllock";if(history&&history.navigationMode){history.navigationMode="compatible"}}var cl={};cl.Initialise=function(){var A="images/";cl.Setup={EmailNode:"a.email",Contact:{Form:"#contactform",ErrorClass:"error",Check:[{Field:"#name",Validate:cl.Validate.String,Req:true,Min:5,Max:40},{Field:"#telephone",Validate:cl.Validate.String,Req:false,Min:6,Max:20,Additonal:function(D){var B=true;if(D==""){var C=owl.Dom.Get("#email");if(C.length==1){B=cl.Validate.Email(C[0].value,true,6,80)}}return B}},{Field:"#email",Validate:cl.Validate.Email,Req:false,Min:6,Max:80,Additonal:function(D){var B=true;if(D==""){var C=owl.Dom.Get("#telephone");if(C.length==1){B=(owl.String.Trim(C[0].value).length>=6)}}return B}},{Field:"#enquiry",Validate:cl.Validate.String,Req:true,Min:10,Max:null}]},PNG:{Location:A,Photo:{Element:"div.photo",File:"photo_#.png"}},Analytics:"UA-114126-11"}};cl.Start=function(){cl.Initialise();cl.EmailParse();new cl.Validator(cl.Setup.Contact);cl.ShowPNGs();cl.Analytics()};new owl.Event(window,"load",cl.Start,0);cl.EmailParse=function(){owl.Each(owl.Dom.Get(cl.Setup.EmailNode),function(A){if(A.firstChild){var B=A.firstChild.nodeValue;B=B.replace(/dot/ig,".");B=B.replace(/\{at\}/ig,"@");B=B.replace(/\s/g,"");A.href="mailto:"+B;owl.Dom.Text(A,B)}})};cl.Validator=function(A){var C=owl.Dom.Get(A.Form);if(C.length==1){this.Form=C[0];this.ErrorClass=A.ErrorClass;this.Fields=A.Check;var B=this;new owl.Event(C,"submit",function(D){B.Check(D)})}};cl.Validator.prototype.Check=function(A){var D=true;var C=this.Form;var B=this.ErrorClass;owl.Each(this.Fields,function(G){var H=owl.Dom.Get(G.Field,C);if(H.length==1){H=H[0]}if(H&&G.Validate){var F=owl.String.Trim(H.value);if(F!=H.value){H.value=F}var E=G.Validate(F,G.Req,G.Min,G.Max);if(G.Additonal){E&=G.Additonal(F)}if(!E){if(D&&H.select&&H.focus){H.select();H.focus()}owl.Css.ClassApply(H.parentNode,B);D=false}else{owl.Css.ClassRemove(H.parentNode,B)}}});if(!D){A.StopDefaultAction()}return D};cl.Validate=function(){function B(G,F,E,D){return !F||(G&&(!E||G.length>=E)&&(!D||G.length<=D))}var A=/^[^@]+@[a-z0-9]+([_\.\-]{0,1}[a-z0-9]+)*([\.]{1}[a-z0-9]+)+$/;function C(H,G,E,D){H=H.toLowerCase();var F=(H!=""&&(!E||H.length>=E)&&(!D||H.length<=D)&&(H.replace(A,"")==""));return(F||(!G&&H==""))}return{String:B,Email:C}}();cl.ShowPNGs=function(){if(owl.Browser.IE&&owl.Browser.VerNum>=5.5&&owl.Browser.VerNum<7){var A=cl.Setup.PNG;owl.Each(owl.Dom.Get(A.Photo.Element),function(B){owl.Image.IEpng(B,A.Location+A.Photo.File.replace(/#/,B.id))})}};cl.Analytics=function(){if(typeof _gat!="undefined"&&_gat._getTracker){var A=_gat._getTracker(cl.Setup.Analytics);A._initData();A._trackPageview()}};
