// OptimalWorks lightbox - (C) optimalworks.net
var owl={};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 B(D){var E=String(D);E=E.replace(A,"");var C=parseInt(E,10);return(isNaN(C)?0:C)}return{toInt:B}}();owl.String=function(){var A=/^\s*|\s*$/g;function B(C){return String(C).replace(A,"")}return{Trim:B}}();if(owl&&!owl.Array){owl.Array=function(){function B(C){return !!(C&&C.constructor==Array)}function A(D,C){D[D.length]=C}return{Is:B,Push:A}}()}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){D(F[E],E)}}};owl.Property=function(){function A(F){if(!F.owlP){F.owlP={};F.owlP.length=0}}function D(G,F,H){if(G){A(G);G.owlP[F]=H;G.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){if(G){if(G.owlP&&G.owlP[F]){delete G.owlP[F];G.owlP.length--;if(G.owlP.length==0){G.owlP=null}}}}return{Set:D,Get:E,Exists:B,Delete:C}}();owl.Css=function(){function C(F){return(F?(owl.Array.Is(F)?F:[F]):null)}function B(G,F){var H=true;if(F){owl.Each(C(G),function(I){var J=" "+I.className+" ";H=(J.indexOf(" "+F+" ")>=0);return H})}return H}function E(G,F){owl.Each(C(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(C(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.999);var H=G/100;owl.Each(C(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})}return{ClassExists:B,ClassApply:E,ClassRemove:D,Opacity:A}}();if(owl&&owl.Browser&&owl.Browser.IE&&Math.floor(owl.Browser.VerNum)==6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}owl.Dom=function(){var R=1;var O=2;var Q=3;var K=8;var J=/[^\w|\s|-|#|\.|,|\[|\]|=|~|!|*]/g;var G=/\s+/g;var P=/^[^#|\.|\[]*/;var E=/#[^#|\.|\[]+/;var F=/\.[^#|\.|\[]+/;var H=/\[(.+)\]/;var L=/([~|!|*]*=)/;var M=/(^[^=|~|!|*])+/;function T(U){return(U?(owl.Array.Is(U)?U:[U]):[document])}function D(Z,V){V=T(V);Z=owl.String.Trim(String(Z).replace(J,"").replace(G," "));var U=[],d=Z.split(","),g,Y,f,b,c,X;for(f=0,b=d.length;f<b;f++){g=owl.String.Trim(d[f]);var W=V.slice();Y=g.split(" ");for(c=0,X=Y.length;c<X;c++){if(V.length>0){W=I(Y[c],W)}}owl.Each(W,function(a){owl.Array.Push(U,a)})}return U}function I(a,i){var d=[],m,f,h,X,c,l,b,Y;var Z={Tag:"",ID:"",Class:"",AttribCheck:function(){return true}};Z.Tag=P.exec(a);Z.Tag=(Z.Tag?Z.Tag[0].toLowerCase():"*");if(Z.Tag==""){Z.Tag="*"}Z.ID=E.exec(a);Z.ID=(Z.ID?Z.ID[0].substr(1):"");Z.Class=F.exec(a);Z.Class=(Z.Class?Z.Class[0].substr(1):"");var j=H.exec(a);if(j){j=j[1];var V,k=null,W=L.exec(j);W=(W?W[1]:null);if(W){var g=j.indexOf(W);V=j.substr(0,g);k=j.substr(g+W.length)}else{V=j}Z.AttribCheck=function(o){var n;switch(V){case"class":n=o.className;break;case"for":n=o.htmlFor;break;default:n=o.getAttribute(V);break}n=(n?n:"");return((n==""&&(!W||W=="!="))||(!W||((W=="="&&n==k)||(W=="!="&&n!=k)||(W=="*="&&n.indexOf(k)>=0)||(W=="~="&&(" "+n+" ").indexOf(" "+k+" ")>=0))))}}for(h=0,X=i.length;h<X;h++){m=[];if(Z.ID){f=document.getElementById(Z.ID);if(f&&(Z.Tag=="*"||f.nodeName.toLowerCase()==Z.Tag)&&(!Z.Class||owl.Css.ClassExists(f,Z.Class))&&Z.AttribCheck(f)){m[0]=f}}else{var U=function(n){return((Z.Tag=="*"||n.nodeName.toLowerCase()==Z.Tag)&&(Z.Class==""||owl.Css.ClassExists(n,Z.Class))&&Z.AttribCheck(n))};if(Z.Tag=="*"){m=N(i[h],0,U)}else{f=i[h].getElementsByTagName(Z.Tag);for(b=0,Y=f.length;b<Y;b++){if(U(f[b])){m[m.length]=f[b]}}}}for(c=0,l=m.length;c<l;c++){d[d.length]=m[c]}}return d}function N(W,U,Y){var X=function(c,f){var d=[],b,Z,a;if(!f){f=1}for(b=0,Z=c.childNodes.length;b<Z;b++){a=c.childNodes[b];if(a.nodeType==R&&a.nodeName!="!"){if(!Y||Y(a)){d[d.length]=a}if(c.childNodes.length>0&&(!U||f<U)){d=d.concat(X(a,f++))}}}return d};W=T(W);var V=[];owl.Each(W,function(Z){V=V.concat(X(Z))});return V}function A(X,W,V,U){X=T(X);W=T(W);owl.Each(W,function(b,a){if(U){C(b)}var c=Math.min(a,X.length-1);for(var Z=0,Y=X[c].childNodes.length;Z<Y;Z++){b.appendChild(X[c].childNodes[Z].cloneNode(true))}if(V){C(X[c])}else{S(b)}})}function S(U){owl.Each(T(U),function(V){N(V,null,function(W){if(W.id){W.removeAttribute("id")}return true})})}function C(U){owl.Each(T(U),function(V){while(V.lastChild){V.removeChild(V.lastChild)}})}function B(V){var W=false;for(var X=0,U=V.childNodes.length;X<U&&!W;X++){W=(V.childNodes[X].nodeType==Q?V.childNodes[X]:B(V.childNodes[X]))}return W}return{ElementNode:R,AttributeNode:O,TextNode:Q,CommentNode:K,Get:D,Descendents:N,Clone:A,RemoveIDs:S,RemoveChildren:C}}();owl.Event=function(B,D,C,A){B=(B?(owl.Array.Is(B)?B:[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"}owl.Xml=function(){var E=1;var G=2;var F=3;var D=8;function A(){var H=null;if(document.implementation&&document.implementation.createDocument){H=document.implementation.createDocument("","xml",null)}else{owl.Each(["MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],function(J){try{H=new ActiveXObject(J)}catch(I){}return !!H})}return H}function B(I){var H=null;if(!I){H=A()}else{if(typeof DOMParser!="undefined"){H=(new DOMParser()).parseFromString(I,"application/xml")}else{H=A();if(H){H.loadXML(I)}}}return H}function C(R,I,H){if(typeof H=="undefined"){H=1}if(H>1){if(R.nodeType==1){var K=document.createElement(R.nodeName);for(var O=0,M=R.attributes.length;O<M;O++){var Q=R.attributes[O].name,J=R.attributes[O].value;switch(Q){case"class":K.className=J;break;case"for":K.htmlFor=J;break;default:K.setAttribute(Q,J);break}}I=I.appendChild(K)}else{if(R.nodeType==3){var P=(R.nodeValue?R.nodeValue:"");var N=owl.String.Trim(P);if(N.indexOf("<!--")!=0&&N.indexOf("-->")!=(N.length-3)){I.appendChild(document.createTextNode(P))}}}}for(var L=0;L<R.childNodes.length;L++){C(R.childNodes[L],I,H+1)}return(I.lastChild?I.lastChild:I)}return{ElementNode:E,AttributeNode:G,TextNode:F,CommentNode:D,New:A,Load:B,Copy:C}}();owl.innerHTML=function(C,D,A){A=(A!=false);C=(C?(owl.Array.Is(C)?C:[C]):null);if(C){var B=owl.Xml.Load("<root>"+D+"</root>");if(B&&B.documentElement){owl.Each(C,function(E){if(A){owl.Dom.RemoveChildren(E)}C=owl.Xml.Copy(B.documentElement,E)})}}return C};owl.Timer=function(A,L,D,N,F,C,M){var B=null,E=(D||D==0?D:1);var I=(N?N:20),K=(F?F:0),J=(C?C:0);this.StartValue=(A?A:0);this.StopValue=(L||L==0?L:100);this.Value=this.StartValue;this.CallBack=(M?M:null);this.OnStart=null;this.OnStop=null;this.OnReverse=null;var H=false;var G=this;this.SetStep=function(O){if(O==0){this.Stop();E=0}else{if((O<0&&this.StartValue<this.StopValue)||(O>0&&this.StartValue>this.StopValue)){E=-O;this.Reverse()}else{E=O}this.Start()}};this.Start=function(){if(!B){H=false;var P=function(Q){if(!H){if(Q){if(G.OnStart){G.OnStart(G)}if(G.CallBack){G.CallBack(G)}}B=setInterval(function(){G.Run()},I)}};var O=(this.Value==this.StartValue);if(O&&K>0){setTimeout(function(){P(O)},K)}else{P(O)}}};this.Run=function(){this.Value+=E;this.Value=(E>0?Math.min(this.Value,this.StopValue):Math.max(this.Value,this.StopValue));if(this.CallBack){this.CallBack(this)}if(this.Value==this.StopValue){this.Stop()}};this.Reverse=function(){var O=this.StartValue;this.StartValue=this.StopValue;this.StopValue=O;E=-E;if(this.OnReverse){this.OnReverse(this)}};this.Stop=function(){H=true;if(B){B=clearInterval(B);if(this.Value==this.StopValue){setTimeout(function(){if(G.OnStop){G.OnStop(G)}},J)}}};if(this.CallBack){this.Start()}};owl.Image=function(){function A(C,D){var B=new Image();B.src=C;if(D){if(B.complete){D(B)}else{B.onload=function(){D(B)}}}}return{Load:A}}();owl.Screen=function(){var D=function(){var G=owl.Dom.Get("body");if(G.length==1){D=function(){return G[0]};return D()}else{return null}};function A(G){var H={X:G.offsetLeft,Y:G.offsetTop};while((G=G.offsetParent)){H.X+=G.offsetLeft;H.Y+=G.offsetTop}return H}var C;function E(){if(!C){if(window.innerWidth){C=function(){return{Width:window.innerWidth,Height:window.innerHeight}}}else{if(document.documentElement&&document.documentElement.clientWidth){C=function(){return{Width:document.documentElement.clientWidth,Height:document.documentElement.clientHeight}}}else{C=function(){return{Width:(D()?D().clientWidth:0),Height:(D()?D().clientHeight:0)}}}}}return C()}function F(){return{X:window.pageXOffset||(document.documentElement&&document.documentElement.scrollLeft)||(D()&&D().scrollLeft),Y:window.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(D()&&D().scrollTop)}}function B(){var G={Width:0,Height:0};if(D()){if(document.documentElement&&document.documentElement.scrollWidth){G.Width=document.documentElement.scrollWidth;G.Height=document.documentElement.scrollHeight}else{if(D().offsetWidth){G.Width=D().offsetWidth;G.Height=D().offsetHeight}}}return G}return{Location:A,ViewPort:E,ViewScroll:F,Page:B}}();owl.Overlay=function(){var A={PageFadeColor:"#000000",PageFadeMax:(owl.Browser.IE?2:20),PageFadeStep:(owl.Browser.IE?20:2),PageFadePause:0};var H=null,G=null,E=null,D="opacity";function F(R,J,I,L,M){if(!H){var P=owl.Dom.Get("body");if(P.length==1){H=P[0].appendChild(document.createElement("div"));H.style.position="absolute";H.style.top="0px";H.style.left="0px"}}if(H){H.style.backgroundColor=(J?J:A.PageFadeColor);owl.Property.Set(H,D,0);owl.Css.Opacity(H,0);H.style.width="100%";H.style.height="100%";var N=owl.Screen.Page();var O=owl.Screen.ViewPort();var K=Math.max(H.offsetWidth,N.Width,(owl.Browser.IE?O.Width:0));var Q=Math.max(H.offsetHeight,N.Height,(owl.Browser.IE?O.Height:0));G=new owl.Overlay.Elements(0,0,K,Q);H.style.width=K+"px";H.style.height=Q+"px";I=(I?I:A.PageFadeMax);E=new owl.Timer(0,I,(L?L:A.PageFadeStep),(M?M:A.PageFadePause));E.CallBack=function(S){owl.Css.Opacity(H,S.Value)};if(R){E.OnStop=function(S){if(S.Value>=I){R()}}}E.Start();return H}else{return null}}function B(I){if(E){E.Reverse();E.OnStop=function(J){G.Show();H.style.width="0px";H.style.height="0px";if(I){I()}};E.Start()}}function C(){var I=document.createElement("iframe");I.src="javascript:false;";I.frameBorder="0";I.scrolling="no";I.style.position="absolute";I.style.padding="0px";I.style.margin="0px";I.style.width="50px";I.style.height="50px";I.style.top="0px";I.style.left="0px";I.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";return I}return{Config:A,PageFadeOut:F,PageFadeIn:B,CreateIframe:C}}();owl.Overlay.Elements=function(B,A,D,C){if(owl.Browser.IE&&owl.Browser.VerNum<7){this.Hidden=null;this.HideTags="select, iframe, applet";this.HideID="owlframe";this.TX=B;this.TY=A;this.BX=D;this.BY=C;this.Cover()}};owl.Overlay.Elements.prototype.Cover=function(){if(this.HideTags&&!this.Hidden){var A=this;this.Hidden=[];owl.Each(owl.Dom.Get(this.HideTags),function(E){if(!owl.Property.Exists(E,A.HideID)){var F=owl.Screen.Location(E);var B={TX:F.X,TY:F.Y,BX:F.X+E.offsetWidth,BY:F.Y+E.offsetHeight};if(B.BX>A.TX&&B.BY>A.TY&&A.BX>B.TX&&A.BY>B.TY){if(owl.Browser.VerNum<5.5){if(E.style.visibility!="hidden"){E.style.visibility="hidden";owl.Array.Push(A.Hidden,{Element:E,Iframe:false})}}else{var C=(E.offsetParent.nodeName.toLowerCase()=="body");var D=E.parentNode.appendChild(owl.Overlay.CreateIframe());D.style.left=(C?B.TX:E.offsetLeft)+Math.max(0,A.TX-B.TX)+"px";D.style.top=(C?B.TY:E.offsetTop)+Math.max(0,A.TY-B.TY)+"px";D.style.width=Math.min(A.BX,B.BX)-Math.max(A.TX,B.TX)+"px";D.style.height=Math.min(A.BY,B.BY)-Math.max(A.TY,B.TY)+"px";owl.Property.Set(D,A.HideID,true);owl.Array.Push(A.Hidden,{Element:E,Iframe:D})}}}})}};owl.Overlay.Elements.prototype.Show=function(){if(this.Hidden){owl.Each(this.Hidden,function(A){if(A.Iframe){A.Element.parentNode.removeChild(A.Iframe)}else{A.Element.style.visibility="visible"}})}this.Hidden=null};owl.Lightbox=function(j){if(!owl.Css.ClassExists(j,owl.Lightbox.Config.Container.ActiveClass)){var g=owl.Dom;var f=owl.Event;var X=owl.Timer;var t=owl.Lightbox.Config;var V=t.Animation;owl.Css.ClassApply(j,t.Container.ActiveClass);var d={shown:false,win:null,img:null,bar:null};var q={};var B=0,E=0,p=0,Y=0,H=0,I=0,i=null;var J=[],v=null,u=0;var s=null,G=false,c=null,K=false;var R=0,P=0,z=0,w=0;var m=null;var k=null,o=null,T=null,b=null,h=null;owl.Each(owl.Dom.Get("a",j),function(A,AA){J[AA]=new owl.Lightbox.Image(A);owl.Property.Set(A,"LBindex",AA);new f(A,"click",function(AB){Q(AB)})});if(!t.Preload.All&&t.Preload.Next&&J.length>0){J[0].Load()}}function Q(AB){if(t.Enabled){S(AB);var AA=owl.Property.Get(AB.Element,"LBindex");J[AA].Load();if(!d.shown){d.shown=true;m=owl.Overlay.PageFadeOut(function(){r(AA)});var A=owl.Screen.ViewPort();H=A.Width;I=A.Height;p=Math.max(t.Size.Minimum,Math.ceil(H-t.Size.WidthPad));Y=Math.max(t.Size.Minimum,Math.ceil(I-t.Size.HeightPad))}}}function O(A){S(A);owl.Each(q,function(AA){AA.Detach()});if(k){k.Stop()}if(o){o.Stop()}d.win.style.display="none";owl.Overlay.PageFadeIn(function(){d.shown=false})}function r(A){if(d.win===null){d.win=owl.Lightbox.CreateWindow();d.img=g.Get("img",d.win)[0];d.bar=g.Get("#lb_bar",d.win)[0];if(J.length<2){owl.Each(g.Get("a[id!=lb_close]",d.bar),function(AA){AA.style.display="none"})}owl.Css.Opacity(d.bar,t.Animation.BarOpacity)}l();B=t.Size.Start;E=B;i=owl.Screen.ViewScroll();d.win.style.display="block";Z(B,E);F(A);q.KeyDown=new f(document,"keydown",M);q.Next=new f(g.Get("#lb_next",d.bar),"click",L);q.Back=new f(g.Get("#lb_back",d.bar),"click",L);q.Close=new f(g.Get("#lb_close",d.bar),"click",O);if(m){q.ClickBack=new f(m,"click",O)}q.MouseOver=new f(d.win,"mouseover",U);q.Focus=new f(d.win,"focus",U);q.MouseOut=new f(d.win,"mouseout",U);q.Blur=new f(d.win,"blur",U);q.MouseMove=new f(d.win,"mousemove",x);q.WinFocus=new f(document,"focus",C)}function C(AA){var A=AA.Target;while(A!=d.win&&A.parentNode){A=A.parentNode}if(A!=d.win){S(AA);d.win.focus();U(AA)}}function M(AA){var AB=AA.Key().Function;if(AA.Key().Pressed==" "){AB="right"}var A={esc:99,left:-1,up:-1,pageup:-1,right:1,down:1,pagedown:-1};if(A[AB]){if(A[AB]==99){O()}else{L(AA,A[AB])}}}function L(AC,AA){S(AC);if(!AA){AA=(AC.Element&&AC.Element.id=="lb_back"?-1:1)}if(v!==null){var AB=v+AA;var A=J.length-1;AB=(AB>A?0:(AB<0?A:AB));if(AB!=v){F(AB)}}}function F(A){l();if(h){h.Stop()}h=null;if(k){k.Stop()}if(o){o.Stop()}G=false;v=A;J[v].Load(y);if(u>0){o=new X(u,0,-V.FadeStep,V.FramePause,0,0,function(AA){n(AA.Value)})}if(!t.Preload.All&&t.Preload.Next&&v+1<J.length){J[v+1].Load()}}function y(){if(o){o.Stop()}n(0);J[v].Resize(p,Y);d.img.width=J[v].Width;d.img.height=J[v].Height;d.img.src=J[v].Src;i=owl.Screen.ViewScroll();Z(B,E);var A=V.SizeStep*(B>J[v].Width?-1:1);var AA=V.SizeStep*(E>J[v].Height?-1:1);if(k){k.Stop()}k=new X(B,J[v].Width,A,V.FramePause,t.Throttle,0);k.CallBack=function(AB){Z(AB.Value,E)};k.OnStop=function(){k=new X(E,J[v].Height,AA,V.FramePause,0,0);k.CallBack=function(AB){Z(B,AB.Value)};k.OnStop=function(){var AB=owl.Screen.Location(d.img);R=AB.X;P=AB.Y;G=true;if(o){o.Stop()}o=new X(0,100,V.FadeStep,V.FramePause,0,0);o.CallBack=function(AC){n(AC.Value)};o.OnStop=function(){if(s){N();D()}};o.Start()};k.Start()};k.Start()}function Z(A,AA){d.img.style.left=((A-d.img.width)/2)+"px";d.img.style.top=((AA-d.img.height)/2)+"px";d.win.style.left=((H-A)/2+i.X)+"px";d.win.style.top=((I-AA)/2+i.Y)+"px";d.win.style.width=A+"px";d.win.style.height=AA+"px";B=A;E=AA}function U(A){if(b){clearInterval(b)}s=!(A.Type=="mouseout"||A.Type=="blur");b=setTimeout(function(){if(s){N();D()}else{l();W()}},t.Throttle)}function N(){if(t.ShowInfo&&G){if(c!=v){if(T){T.Stop();T=null}c=v;var AB=g.Get("p",d.bar)[0];g.Clone(J[c].Node,AB,false,true);var A=g.Get("img",AB);if(A.length>0){A[0].parentNode.removeChild(A[0])}}if(T){if(T.OnStop){T.OnStop=null;T.Reverse()}}else{var AA=-d.bar.offsetHeight;T=new X(AA,-1,V.BarStep,V.FramePause,0,0);T.CallBack=function(AC){K=AC.Value;d.bar.style.bottom=K+"px"};d.bar.style.visibility="visible"}T.Start()}}function l(){if(T&&!T.OnStop){T.Reverse();T.OnStop=function(){T=null};T.Start()}else{d.bar.style.visibility="hidden"}}function D(){if(t.Magnify&&G){if(h){if(h.OnStop){h.OnStop=null;h.Reverse()}}else{if(J[v].Ratio<1){h=new X(J[v].Ratio,1,(1-J[v].Ratio)/V.ZoomSteps,V.FramePause,0,0);h.CallBack=function(A){a(A.Value)}}}if(h){h.Start()}}}function W(){if(h&&!h.OnStop){h.Reverse();h.OnStop=function(){h=null};h.Start()}}function x(AA){if(t.Magnify&&G&&s&&J[v].Ratio<1){var A=AA.Mouse();z=Math.max(0,Math.min(B,A.X-R));w=Math.max(0,Math.min(E,A.Y-P));if(!h||h.Value==1){a()}}}function a(AB){var A,AA;if(AB){A=Math.ceil(J[v].RealWidth*AB);AA=Math.ceil(J[v].RealHeight*AB)}else{A=d.img.width;AA=d.img.height}d.img.style.left=((1-((B-z)/B))*(B-A))+"px";d.img.style.top=((1-((E-w)/E))*(E-AA))+"px";if(AB){d.img.width=A;d.img.height=AA}}function n(A){owl.Css.Opacity(d.img,A);u=A}function S(A){if(A){A.StopDefaultAction();A.StopPropagation();if(A.Element&&A.Element.blur){A.Element.blur()}}}};owl.Lightbox.CreateWindow=function(){var A=owl.innerHTML(owl.Dom.Get("body"),owl.Lightbox.Config.WindowHTML,false);owl.Lightbox.CreateWindow=function(){return A};return owl.Lightbox.CreateWindow()};owl.Lightbox.Image=function(A){this.Node=A;this.Src=this.Node.href;this.Pic=null;this.RealWidth=0;this.RealHeight=0;this.Ratio=1;this.Width=0;this.Height=0;this.Loading=false;this.LoadCallback=null;if(owl.Lightbox.Config.Preload.All){this.Load()}};owl.Lightbox.Image.prototype.Load=function(C){if(C){var B=this.LoadCallback;if(B){this.LoadCallback=function(){B();C()}}else{this.LoadCallback=C}}if(this.Pic===null){if(!this.Loading){this.Loading=true;var A=this;owl.Image.Load(this.Src,function(D){A.Pic=D;A.Loading=false;A.RealWidth=D.width;A.RealHeight=D.height;if(A.LoadCallback){A.LoadCallback();A.LoadCallback=null}})}}else{if(this.LoadCallback){this.LoadCallback();this.LoadCallback=null}}};owl.Lightbox.Image.prototype.Resize=function(B,A){if(this.RealWidth>0&&this.RealHeight>0){this.Ratio=Math.min(Math.min(B/this.RealWidth,1),Math.min(A/this.RealHeight,1));this.Width=Math.floor(this.RealWidth*this.Ratio);this.Height=Math.floor(this.RealHeight*this.Ratio)}};owl.Lightbox.Config={AutoStart:true,Enabled:true,ShowInfo:true,Magnify:true,Throttle:200,Container:{Element:".lightbox",ActiveClass:"active"},Preload:{All:false,Next:false},Size:{Start:40,Minimum:200,WidthPad:30,HeightPad:50},Animation:{FramePause:10,FadeStep:5,SizeStep:20,BarOpacity:60,BarStep:2,ZoomSteps:20},WindowHTML:'<div id="lb_window"><div id="lb_image"><img tabindex="0" /><div id="lb_bar"><p></p><a id="lb_close" href="#" title="close"><strong>close</strong></a><a  id="lb_next" href="#" title="next image"><strong>next</strong></a><a id="lb_back" href="#" title="previous image"><strong>back</strong></a></div></div></div>'};if(owl.Lightbox.Config.AutoStart){new owl.Event(window,"load",function(A){owl.Each(owl.Dom.Get(owl.Lightbox.Config.Container.Element),function(B){new owl.Lightbox(B)})},99999)};
