(function(){var I=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]+\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g;var A=null;var F=0;if(document.addEventListener&&!document.querySelectorAll){A={};function G(){A={}}document.addEventListener("DOMAttrModified",G,false);document.addEventListener("DOMNodeInserted",G,false);document.addEventListener("DOMNodeRemoved",G,false)}var C=function(X,L,U,O){var R=!U;U=U||[];L=L||document;if(L.nodeType!==1&&L.nodeType!==9){return[]}if(!X||typeof X!=="string"){return U}if(A&&L===document&&A[X]){U.push.apply(U,A[X]);return U}var V=[],W,S,a,Z,T,K;I.lastIndex=0;while((W=I.exec(X))!==null){V.push(W[1]);if(W[2]){K=RegExp.rightContext;break}}var b=O?{expr:V.pop(),set:B(O)}:C.find(V.pop(),L);S=C.filter(b.expr,b.set);if(V.length>0){a=B(S)}while(V.length){var M=V.pop(),P=M;if(!D.relative[M]){M=""}else{P=V.pop()}if(P==null){P=L}var N="",Q;if(typeof P==="string"){while((Q=D.match.POS.exec(P))){N+=Q[0];P=P.replace(D.match.POS,"")}}D.relative[M](a,P);if(N){C.filter(N,a,true)}}if(!a){a=S}if(!a){throw"Syntax error, unrecognized expression: "+(M||X)}if(a instanceof Array){if(L.nodeType===1){for(var Y=0;a[Y]!=null;Y++){if(a[Y]&&a[Y].nodeType===1&&E(L,a[Y])){U.push(S[Y])}}}else{for(var Y=0;a[Y]!=null;Y++){if(a[Y]&&a[Y].nodeType===1){U.push(S[Y])}}}}else{B(a,U)}if(K){arguments.callee(K,L,U)}if(A&&R){A[X]=U.slice(0)}return U};C.matches=function(K,L){return C(K,null,null,L)};C.find=function(S,K){var R,P;if(!S){return[]}var O="",P;while((P=D.match.PSEUDO.exec(S))){var L=RegExp.leftContext;if(L.substr(L.length-1)!=="\\"){O+=P[0];S=S.replace(D.match.PSEUDO,"")}else{break}}for(var N=0,M=D.order.length;N<M;N++){var Q=D.order[N];if((P=D.match[Q].exec(S))){var L=RegExp.leftContext;if(L.substr(L.length-1)!=="\\"){P[1]=(P[1]||"").replace(/\\/g,"");R=D.find[Q](P,K);if(R!=null){S=S.replace(D.match[Q],"");break}}}}if(!R){R=K.getElementsByTagName("*")}S+=O;return{set:R,expr:S}};C.filter=function(U,T,Y){var N=U,a=[],R=T,Q;while(U&&T.length){for(var S in D.filter){if((Q=D.match[S].exec(U))!=null){var L=false,M=D.filter[S],W=null;Q[1]=(Q[1]||"").replace(/\\/g,"");if(R==a){a=[]}if(D.preFilter[S]){Q=D.preFilter[S](Q,R);if(Q[0]===true){W=[];var V=null,O;for(var P=0;(O=R[P])!==undefined;P++){if(O&&V!==O){W.push(O);V=O}}}}var K=0,Z,X;for(var P=0;(X=R[P])!==undefined;P++){if(X){if(W&&X!=W[K]){K++}Z=M(X,Q,K,W);if(Y&&Z!=null){R[P]=Z?R[P]:false}else{if(Z){a.push(X);L=true}}}}if(Z!==undefined){if(!Y){R=a}U=U.replace(D.match[S],"");if(!L){return[]}break}}}U=U.replace(/\s*,\s*/,"");if(U==N){throw"Syntax error, unrecognized expression: "+U}N=U}return R};var D=C.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u0128-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u0128-\uFFFF_-]|\\.)+)/,NAME:/\[name=((?:[\w\u0128-\uFFFF_-]|\\.)+)\]/,ATTR:/\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S{0,1}=)\s*(['"]*)(.*?)\3|)\]/,TAG:/^((?:[\w\u0128-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child\(?(even|odd|[\dn+-]*)\)?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)\(?(\d*)\)?(?:[^-]|$)/,PSEUDO:/:((?:[\w\u0128-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className"},relative:{"+":function(O,L){for(var M=0,K=O.length;M<K;M++){var N=O[M];if(N){var P=N.previousSibling;while(P&&P.nodeType!==1){P=P.previousSibling}O[M]=P||false}}C.filter(L,O,true)},">":function(P,L){if(typeof L==="string"&&!/\W/.test(L)){L=L.toUpperCase();for(var M=0,K=P.length;M<K;M++){var O=P[M];if(O){var N=O.parentNode;P[M]=N.nodeName===L?N:false}}}else{for(var M=0,K=P.length;M<K;M++){var O=P[M];if(O){P[M]=O.parentNode;if(typeof L!=="string"){P[M]=P[M]==L}}}if(typeof L==="string"){C.filter(L,P,true)}}},"":function(N,L){var M="done"+(F++),K=J;if(!L.match(/\W/)){var O=L=L.toUpperCase();K=H}K("parentNode",L,M,N,O)},"~":function(N,L){var M="done"+(F++),K=J;if(!L.match(/\W/)){var O=L=L.toUpperCase();K=H}K("previousSibling",L,M,N,O)}},find:{ID:function(L,M){if(M.getElementById){var K=M.getElementById(L[1]);return K?[K]:[]}},NAME:function(K,L){return L.getElementsByName(K[1])},TAG:function(K,L){return L.getElementsByTagName(K[1])}},preFilter:{CLASS:function(K){return new RegExp("(?:^|\\s)"+K[1]+"(?:\\s|$)")},ID:function(K){return K[1]},TAG:function(K){return K[1].toUpperCase()},CHILD:function(K){if(K[1]=="nth"){var L=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(K[2]=="even"&&"2n"||K[2]=="odd"&&"2n+1"||!/\D/.test(K[2])&&"0n+"+K[2]||K[2]);K[2]=(L[1]+(L[2]||1))-0;K[3]=L[3]-0}K[0]=typeof get_length=="undefined"?"done"+(F++):"nodeCache";return K},ATTR:function(L){var K=L[1];if(D.attrMap[K]){L[1]=D.attrMap[K]}return L},PSEUDO:function(K){if(K[1]==="not"){K[3]=K[3].split(/\s*,\s*/)}return K},POS:function(K){K.unshift(true);return K}},filters:{enabled:function(K){return K.disabled===false&&K.type!=="hidden"},disabled:function(K){return K.disabled===true},checked:function(K){return K.checked===true},selected:function(K){K.parentNode.selectedIndex;return K.selected===true},parent:function(K){return !!K.firstChild},empty:function(K){return !K.firstChild},has:function(M,L,K){return !!C(K[3],M).length},header:function(K){return/h\d/i.test(K.nodeName)},text:function(K){return"text"===K.type},radio:function(K){return"radio"===K.type},checkbox:function(K){return"checkbox"===K.type},file:function(K){return"file"===K.type},password:function(K){return"password"===K.type},submit:function(K){return"submit"===K.type},image:function(K){return"image"===K.type},reset:function(K){return"reset"===K.type},button:function(K){return"button"===K.type||K.nodeName.toUpperCase()==="BUTTON"},input:function(K){return/input|select|textarea|button/i.test(K.nodeName)}},setFilters:{first:function(L,K){return K===0},last:function(M,L,K,N){return L===N.length-1},even:function(L,K){return K%2===0},odd:function(L,K){return K%2===1},lt:function(M,L,K){return L<K[3]-0},gt:function(M,L,K){return L>K[3]-0},nth:function(M,L,K){return K[3]-0==L},eq:function(M,L,K){return K[3]-0==L}},filter:{CHILD:function(K,N){var Q=N[1],R=K.parentNode;var P=N[0];if(R&&!R[P]){var O=1;for(var L=R.firstChild;L;L=L.nextSibling){if(L.nodeType==1){L.nodeIndex=O++}}R[P]=O-1}if(Q=="first"){return K.nodeIndex==1}else{if(Q=="last"){return K.nodeIndex==R[P]}else{if(Q=="only"){return R[P]==1}else{if(Q=="nth"){var T=false,M=N[2],S=N[3];if(M==1&&S==0){return true}if(M==0){if(K.nodeIndex==S){T=true}}else{if((K.nodeIndex-S)%M==0&&(K.nodeIndex-S)/M>=0){T=true}}return T}}}}},PSEUDO:function(Q,M,N,R){var L=M[1],O=D.filters[L];if(O){return O(Q,N,M,R)}else{if(L==="contains"){return(Q.textContent||Q.innerText||"").indexOf(M[3])>=0}else{if(L==="not"){var P=M[3];for(var N=0,K=P.length;N<K;N++){if(C.filter(P[N],[Q]).length>0){return false}}return true}}}},ID:function(L,K){return L.nodeType===1&&L.getAttribute("id")===K},TAG:function(L,K){return(K==="*"&&L.nodeType===1)||L.nodeName===K},CLASS:function(L,K){return K.test(L.className)},ATTR:function(O,M){var K=O[M[1]],P=K+"",N=M[2],L=M[4];return K==null?false:N==="="?P===L:N==="*="||N==="~="?P.indexOf(L)>=0:!M[4]?K:N==="!="?P!=L:N==="^="?P.indexOf(L)===0:N==="$="?P.substr(P.length-L.length)===L:N==="|="?P===L||P.substr(0,L.length+1)===L+"-":false},POS:function(O,L,M,P){var K=L[2],N=D.setFilters[K];if(N){return N(O,M,L,P)}}}};function B(L,K){L=Array.prototype.slice.call(L);if(K){K.push.apply(K,L);return K}return L}if(document.all&&!window.opera){function B(N,M){if(N instanceof Array){return Array.prototype.slice.call(N)}var K=M||[];for(var L=0;N[L];L++){K.push(N[L])}return K}D.find.ID=function(L,M){if(M.getElementById){var K=M.getElementById(L[1]);return K?K.id===L[1]||K.getAttributeNode&&K.getAttributeNode("id").nodeValue===L[1]?[K]:undefined:[]}};D.filter.ID=function(M,K){var L=M.getAttributeNode&&M.getAttributeNode("id");return M.nodeType===1&&L&&L.nodeValue===K}}if(document.querySelectorAll){(function(){var K=C;window.Sizzle=C=function(N,M,L){M=M||document;if(M.nodeType===9){try{return B(M.querySelectorAll(N))}catch(O){}}return K(N,M,L)};C.find=K.find;C.filter=K.filter;C.selectors=K.selectors})()}if(document.getElementsByClassName){D.order.splice(1,0,"CLASS");D.find.CLASS=function(K,L){return L.getElementsByClassName(K[1])}}function H(L,R,Q,T,S){for(var O=0,M=T.length;O<M;O++){var K=T[O];if(K){K=K[L];var P=false;while(K&&K.nodeType){var N=K[Q];if(N){P=T[N];break}if(K.nodeType===1){K[Q]=O}if(K.nodeName===R){P=K;break}K=K[L]}T[O]=P}}}function J(L,Q,P,S,R){for(var N=0,M=S.length;N<M;N++){var K=S[N];if(K){K=K[L];var O=false;while(K&&K.nodeType){if(K[P]){O=S[K[P]];break}if(K.nodeType===1){K[P]=N;if(C.filter(Q,[K]).length>0){O=K;break}}K=K[L]}S[N]=O}}}if(document.compareDocumentPosition){function E(L,K){return L.compareDocumentPosition(K)&16}}else{function E(L,K){return L!==K&&L.contains(K)}}ALL.Sizzle=C})();var config={debug:false};function log(A){if(config.debug){(typeof console!="undefined"&&typeof console.log!="undefined")?console.log(A):alert(A)}}function ImagePreloader(A,C){this.call_back=C;this.nLoaded=0;this.nProcessed=0;this.aImages=new Array;this.nImages=A.length;for(var B=0;B<A.length;B++){this.preload(A[B])}}ImagePreloader.prototype.preload=function(B){var A=new Image;this.aImages.push(A);A.onload=ImagePreloader.prototype.onload;A.onerror=ImagePreloader.prototype.onerror;A.onabort=ImagePreloader.prototype.onabort;A.oImagePreloader=this;A.bLoaded=false;A.src=B;log(B)};ImagePreloader.prototype.onComplete=function(){this.nProcessed++;if(this.nProcessed==this.nImages){this.call_back(this.aImages,this.nLoaded)}};ImagePreloader.prototype.onload=function(){this.bLoaded=true;this.oImagePreloader.nLoaded++;this.oImagePreloader.onComplete()};ImagePreloader.prototype.onerror=function(){this.bError=true;this.oImagePreloader.onComplete()};ImagePreloader.prototype.onabort=function(){this.bAbort=true;this.oImagePreloader.onComplete()};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length,C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}for(;C<A;C++){if(C in this&&this[C]===B){return C}}return -1}}var $extend=function(){var A=arguments,B;if(!A[1]){A=[this,A[0]]}for(B in A[1]){A[0][B]=A[1][B]}return A[0]};function $(A){return document.getElementById(A)}function $$(A){return document.getElementsByTagName(A)}function $$$(B,H){var D=new Array(),A=$$(B),F,G,C,E;for(F=0;F<A.length;F++){G=A[F];E=G.className.split(" ");for(C=0;C<E.length;C++){if(E[C]==H){D.push(G)}}}return D}function defined(A){return(A!=undefined)}function show(A){A.style.display=""}function hide(A){A.style.display="none"}function size(A){return{width:A.clientWidth,height:A.clientHeight}}function addEvent(C,D,B,A){A=(A)?A:false;if(C.addEventListener){C.addEventListener(D,B,A)}else{if(C.attachEvent){C.attachEvent("on"+D,B)}else{C["on"+D]=B}}}function removeEvent(C,D,B,A){A=(A)?A:false;if(C.removeEventListener){C.removeEventListener(D,B,A)}else{if(C.attachEvent){C.detachEvent("on"+D,B)}else{C["on"+D]=null}}}function addOnLoadEvent(A){if(window.addEventListener||window.attachEvent){addEvent(window,"load",A,false)}else{var B=(window.onload)?window.onload:function(){};window.onload=function(){B();A()}}}function pos(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return{left:B,top:curtop}}function Tabs(H,E,D,G){var B,F=[],A;var C=$j("#"+H+" a");C.each(function(J,I){F.push($(I.href.split("#")[1]))});A=function(I){if(typeof I!="number"||I<0||I>=C.length){return false}var K=F[I],J;for(J=0;J<F.length;J++){F[J].style.display="none";element=C[J];while(element.nodeName.toLowerCase()!="li"){element=element.parentNode}klasa=element.className;if(klasa.indexOf("active")!=-1){if(klasa!=""){element.className=klasa.split("active")[0]+" "+klasa.split("active")[1]}else{element.className=""}}}K.style.display="block";element=C[I];while(element.nodeName.toLowerCase()!="li"){element=element.parentNode}element.className+=" active";setFormFocus();if(D&&I==E){D()}if(G&&I!=E){G()}};setFormFocus=function(){F.each(function(J){if(J.style.display=="block"){var I=jQuery("#"+J.id+" form:first input");I.each(function(){if(this.type!="hidden"){this.focus();return false}});return false}})};tabClick=function(I){for(B in C){if(I.target==C[B]){A(+B)}}return false};C.each(function(J,I){$j(I).bind("click",tabClick);I.href=""});A(E);return{togglers:C,tabs:F,setTab:A}}function hash_merge(B,A){for(p in A){(typeof A[p]=="object"&&B[p])?hash_merge(B[p],A[p]):B[p]=A[p]}}Array.prototype.each=function(B){var A;for(A=0;A<this.length;A++){log("taking care of element: "+this[A]);B(this[A],A)}};Array.prototype.collect=function(B){var A;for(A=0;A<this.length;A++){this[A]=B(this[A])}};Array.prototype.include=function(B){var A;for(A=0;A<this.length;A++){if(this[A]==B){return true}}return false};if(!Array.indexOf){Array.prototype.indexOf=function(B){var A;for(A=0;A<this.length;A++){if(this[A]==B){return A}}return -1}}function getElements(C){var B,A=[];for(B=0;B<C.length;B++){A.push(C[B])}return A}function serialize(B){var E="",D,C,A;switch(typeof B){case"number":case"boolean":case"function":return B;break;case"string":return"'"+B+"'";break;case"object":if(B.constructor===Array||typeof B.callee!=="undefined"||B.constructor.toString().indexOf("Array")!=-1){E="[";A=B.length;for(C=0;C<A-1;C++){E+=serialize(B[C])+","}E+=serialize(B[C])+"]"}else{E="{";for(D in B){E+=D+":"+serialize(B[D])+","}E=E.replace(/\,$/,"")+"}"}return E;break;default:return"unknown";break}}function watchProperty(prop,func){var old_value=eval(prop),new_value;setInterval(function(){new_value=eval(prop);if(new_value!=old_value){func(old_value,new_value);old_value=new_value}},50)}function getCSSRule(D,F){D=D.toLowerCase();if(document.styleSheets){for(var B=0;B<document.styleSheets.length;B++){var E=document.styleSheets[B];var C=0;var A=false;do{if(E.cssRules){A=E.cssRules[C]}else{A=E.rules[C]}if(A){if(A.selectorText.toLowerCase()==D){if(F=="delete"){if(E.cssRules){E.deleteRule(C)}else{E.removeRule(C)}return true}else{return A}}}C++}while(A)}}return false}function killCSSRule(A){return getCSSRule(A,"delete")}function addCSSRule(A){if(document.styleSheets){if(!getCSSRule(A)){if(document.styleSheets[((arguments[1]&&arguments[1]<document.styleSheets.length)?arguments[1]:document.styleSheets.length-1)].addRule){document.styleSheets[((arguments[1]&&arguments[1]<document.styleSheets.length)?arguments[1]:document.styleSheets.length-1)].addRule(A,null,0)}else{document.styleSheets[((arguments[1]&&arguments[1]<document.styleSheets.length)?arguments[1]:document.styleSheets.length-1)].insertRule(A+" { }",0)}}}return getCSSRule(A)}function resizePhoto(C,D,A,B){if(typeof B=="undefined"){B={}}if(typeof B.shrink=="undefined"){B.shrink=true}if(typeof B.enlarge=="undefined"){B.enlarge=false}if((B.shrink&&(C.width>D||C.height>A))||(B.enlarge&&(C.width<D||C.height<A))){if(C.height!=0&&A!=0&&((C.width/C.height)>(D/A))){C.removeAttribute("height");C.width=D}else{C.removeAttribute("width");C.height=A}}}function Gallery(){var gallery=this,html;this.config={service_name:"",img_alt:"",zoom_msg:"",target_div:"gallery",images_path:"images",type:"small",active:0,gallery:{small:{image_size:{width:400,height:300},size:{width:420,height:0},cache:"all"},large:{image_size:{width:1024,height:768},size:{width:0,height:0},photo:{enlarge:false,shrink:true,center:false,click_closes:true},cache:1,same_window:false,overlay:true}}};if(typeof arguments[0]=="object"){hash_merge(gallery.config,arguments[0])}this.images_count=gallery.config.pictures.small.length;this.target=$(gallery.config.target_div);this.cache={};for(size in gallery.config.pictures){gallery.cache[size]=[]}["small","large"].each(function(x){if(typeof gallery.config.gallery[x]["cache"]!="number"||gallery.config.gallery[x]["cache"]>gallery.images_count){gallery.config.gallery[x]["cache"]=gallery.images_count}});css={small:[{selector:"#gallery-thumbs li",rules:{cssFloat:"left",styleFloat:"left",margin:"2px",padding:"0",fontSize:"0px"}},{selector:"#gallery-thumbs li a",rules:{margin:"0",display:"block",padding:"2px",outline:"none",background:"#fff url("+gallery.config.images_path+"/thumb-bg.gif) no-repeat 0 0"}},{selector:"#gallery-thumbs li a:hover",rules:{backgroundColor:"#999"}},{selector:"#gallery-thumbs li.active a",rules:{backgroundColor:"#000"}}]};html={small:'\n<div id="gallery" style="width: '+gallery.config.gallery.small.size.width+'px;margin: 20px auto;padding:20px 0 20px 0;position: relative; background: #fff;border: 1px #ccc solid">\n  <div id="gallery-container" style="text-align: center;padding: 0; margin: 0; height: 310px">\n    <img id="gallery-photo" style="margin: 0 auto; cursor: pointer" alt="'+gallery.config.img_alt+'" src="'+gallery.config.images_path+'/blank.gif"/>\n  </div>\n  <div id="gallery-thumbs-container" style="height: 100px;padding: 0;margin: 0">\n		<a href="#" id="next-photo" style="float: right; height: 20px; margin-right: 10px; width: 21px; background: url('+gallery.config.images_path+'/navi.gif) no-repeat top right; overflow: hidden; outline: none"></a>\n		<a href="#" id="prev-photo" style="float: right; height: 20px; margin-left: 10px; margin-right: 2px; width: 21px; background: url('+gallery.config.images_path+'/navi.gif) no-repeat bottom left; overflow: hidden; outline: none"></a>\n		<a href="#" style="text-align:left; float:left; margin-left: 10px; font-size:9px; color: #999; padding-top: 4px;" id="gallery-trigger">'+gallery.config.zoom_msg+'</a>\n		<div class="clear"></div>\n    <ul id="gallery-thumbs" style="list-style: none;padding: 0;margin: 20px 0 0 0; float: left; display: inline; margin-left:32px; clear: both"><THUMBS></ul>\n  </div>\n	<div style="clear:both"></div>\n</div>\n',small_single:'\n<div class="tocenter"><img id="gallery-photo" /></div>\n',large:'\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n<script src="/js/all-ui-min-4.js" type="text/javascript" charset="utf-8"><\/script>\n<script type="text/javascript">\nvar gallery;\nfunction init_gallery(){\n  gallery = new Gallery(<GALLERY-CONFIG>);\n}\n<\/script>\n<style type="text/css" media="screen">\n	body {background: #111; margin: 0; padding: 0; }\n	#gallery {text-align: center}\n	#gallery-photo-container {text-align: center; margin: 10px auto;}\n	#gallery-photo {border: 10px #fff solid}\n	#gallery-overlay {position:absolute;visibility:hidden;background:#000 url('+gallery.config.images_path+"/gallery-spinner.gif) no-repeat center center;width:100%;height:100%;opacity: 0.4;filter: alpha(opacity = 40);z-index:1001}\n	#gallery-thumbs {float: left; margin:0; padding:0 0 0 10px; list-style:none}\n	#gallery-thumbs li {float: left;}\n	#gallery-thumbs li a {margin: 0 2px; display: block; padding: 2px; outline: none; background: #fff url("+gallery.config.images_path+'/thumb-bg.gif) no-repeat 0 0}\n	#gallery-thumbs li a img { display:block }\n	#gallery-thumbs li a:hover {background-color: #999}\n	#gallery-thumbs li.active a {background-color: #000}\n</style>\n</head>\n<body onload="init_gallery()">\n	<div id="gallery-overlay"></div>\n	<div id="gallery">\n		<div id="gallery-navbar" style="float: left; width: 100%; background: #fff;padding: 4px 0;border-bottom: 2px #333 solid;margin:0">\n			<img style="float:left" src="'+gallery.config.logo+'" />\n			<ul id="gallery-thumbs" class="spinner"></ul>\n		</div>\n		<div style="clear:both"></div>\n		<div id="gallery-photo-container">\n			<img id="gallery-photo" style="cursor:pointer" alt="'+gallery.config.img_alt+'" src="'+gallery.config.images_path+'/blank.gif" />\n		</div>\n	</div>\n</body>\n</html>\n'};this.popupLargeGallery=function(){var g,window_name,width,height,tmp={};if((gallery.config.gallery.large.size.width<window.screen.availWidth)&&(gallery.config.gallery.large.size.width!=0)){width=gallery.config.gallery.large.size.width}else{width=window.screen.availWidth}if((gallery.config.gallery.large.size.height<window.screen.availHeight)&&(gallery.config.gallery.large.size.height!=0)){height=gallery.config.gallery.large.size.height}else{height=window.screen.availHeight}gallery.config.gallery.large.same_window?window_name="GalleryWindow":window_name=Math.random().toString().replace(".","");g=window.open("",window_name,"width="+width+",height="+height+",left=0,top=0,resizable=yes,scrollbars=yes");hash_merge(tmp,gallery.config);hash_merge(tmp,{type:"large",img_alt:""});g.document.write(html.large.replace("<GALLERY-CONFIG>",serialize(tmp)));g.document.title=gallery.config.service_name;g.document.close()};this.initGallery=function(){var lis,thumbs="";new ImagePreloader(gallery.config.pictures.small,function(){gallery.config.pictures.small.each(function(x,i){gallery.cache.small[i]=true})});if(gallery.images_count>1){gallery.config.pictures.small.each(function(pic){thumbs+='<li><a href="#"><img style="width:80px;height:60px;border:none" alt="'+gallery.config.img_alt+'" src="'+pic+'" /></a></li>\n'})}if(gallery.config.type=="small"){if(gallery.images_count>1){$(gallery.config.target_div).innerHTML=html.small.replace("<THUMBS>",thumbs)}else{$(gallery.config.target_div).innerHTML=html.small_single}if(gallery.images_count>1){$("gallery-photo").onclick=function(){gallery.popupLargeGallery()}}if($("gallery-trigger")){$("gallery-trigger").onclick=function(){gallery.popupLargeGallery();return false}}if($("next-photo")){$("next-photo").onclick=function(){if(gallery.config.active<gallery.images_count-1){gallery.config.active++}return false}}if($("prev-photo")){$("prev-photo").onclick=function(){if(gallery.config.active>0){gallery.config.active--}return false}}}else{$("gallery-thumbs").innerHTML=thumbs;$("gallery-photo").onclick=function(){window.close()}}if(gallery.images_count>1){getElements($("gallery-thumbs").getElementsByTagName("li")).each(function(li,i){if(i==gallery.config.active){ALL.dom.element.addClass(li,"active")}li.onclick=function(){gallery.config.active=i;return false}});this.watchOutFor("gallery.config.active",function(){var lis=$("gallery-thumbs").getElementsByTagName("li");ALL.dom.element.removeClass(lis[arguments[0]],"active");ALL.dom.element.addClass(lis[arguments[1]],"active");if($("prev-photo")&&$("prev-photo")){if(arguments[1]==gallery.images_count-1){$("next-photo").style.backgroundPosition="bottom right";$("prev-photo").style.backgroundPosition="top left"}else{if(arguments[1]==0){$("prev-photo").style.backgroundPosition="bottom left";$("next-photo").style.backgroundPosition="top right"}else{$("next-photo").style.backgroundPosition="top right";$("prev-photo").style.backgroundPosition="top left"}}}gallery.showPhoto(arguments[1])})}gallery.showPhoto(gallery.config.active)};this.showPhoto=function(id){if(gallery.config.pictures.medium&&gallery.config.pictures.medium.length>0&&gallery.config.type=="small"){gallery.showImage("medium",id,$("gallery-photo"),function(){if(gallery.images_count>1){resizePhoto($("gallery-photo"),gallery.config.gallery.small.image_size.width,gallery.config.gallery.small.image_size.height)}})}else{gallery.showImage("large",id,$("gallery-photo"),function(){resizePhoto($("gallery-photo"),gallery.config.gallery.large.image_size.width,gallery.config.gallery.large.image_size.height)})}gallery.config.active=id};this.showImage=function(size,img_no,el){var funkcja;(arguments.length==4&&typeof (arguments[3])=="function")?funkcja=arguments[3]:funkcja=false;if(gallery.cache[size][img_no]){if(el){el.removeAttribute("height");el.removeAttribute("width");el.src=gallery.config.pictures[size][img_no]}if(funkcja){funkcja()}}else{if(gallery.config.type=="large"){if(gallery.config.gallery.large.overlay){$("gallery-overlay").style.visibility="visible"}}new ImagePreloader([gallery.config.pictures[size][img_no]],function(){var i;gallery.cache[size][img_no]=true;if(el){el.removeAttribute("height");el.removeAttribute("width");el.src=gallery.config.pictures[size][img_no]}if(funkcja){funkcja()}if(gallery.config.type=="large"){if(gallery.config.gallery.large.overlay){$("gallery-overlay").style.visibility="hidden"}}})}};this.watchOutFor=function(prop,func){var old_value=eval(prop),new_value;setInterval(function(){new_value=eval(prop);if(new_value!=old_value){func(old_value,new_value);old_value=new_value}},50)};gallery.initGallery()}ALL.utils.carousel=function(options){var instance=this;instance.interval=null;config={autoRotate:true,autoRotateDelay:5000,pauseOnHover:true,element_id:"showCase",ajax:{url:"http://static.allegrostatic.pl/site_images/168/0/showcase/showcase.php?showcase_nr=",ids:[1,2,3]},containers_count:3,containers_id_prefix:"showCase",navigation:"switchSC",navigation_active_class:"active",effect:"fade"};instance.current=0;ALL.utils.hashMerge(config,options);this.watchOutFor=function(prop,func){var old_value=eval(prop),new_value;setInterval(function(){new_value=eval(prop);if(new_value!=old_value){func(old_value,new_value);old_value=new_value}},50)};instance._init=function(){var nav;instance.watchOutFor("instance.current",function(old_val,new_val){old_val=ALL.utils.mod(old_val,config.containers_count);new_val=ALL.utils.mod(new_val,config.containers_count);if(config.autoRotate){instance._stop()}instance.changeContainer(old_val,new_val);if(config.autoRotate){instance._start()}ALL.dom.element.removeClass(ALL.Sizzle("#"+config.navigation+" .page")[old_val],"active");ALL.dom.element.addClass(ALL.Sizzle("#"+config.navigation+" .page")[new_val],"active")});if(ALL.Sizzle("#"+config.navigation).length==0){config.navigation=config.navigation.toLowerCase()}ALL.Sizzle("#"+config.navigation+" .forward")[0].onclick=function(){instance.current++};ALL.Sizzle("#"+config.navigation+" .backward")[0].onclick=function(){instance.current--};ALL.Sizzle("#"+config.navigation+" .page").each(function(pager){pager.onclick=function(){instance.current=parseInt(this.id.replace(/[^\d]*/,""))}})};instance._start=function(){instance.interval=setInterval(function(){instance.current++},config.autoRotateDelay)};instance._stop=function(){clearInterval(instance.interval)};instance.changeContainer=function(from,to){if(ALL.Sizzle("#"+config.element_id).length==0){config.element_id=config.element_id.toLowerCase()}previous_el=ALL.Sizzle("#"+config.element_id+" .page")[from];current_el=ALL.Sizzle("#"+config.element_id+" .page")[to];instance.switchShowcase(previous_el,current_el)};instance.switchShowcase=function(old_el,new_el){new_el.style.display="block";instance.animation=new ALL.effects.fadeOut({element:old_el,speed:200},function(data){old_el.style.display="none";instance.animation=new ALL.effects.fadeIn({element:new_el,speed:200})})};instance._init();if(config.autoRotate){instance._start()}if(config.autoRotate&&config.pauseOnHover){ALL.$(config.element_id).onmouseover=function(){instance._stop()};ALL.$(config.element_id).onmouseout=function(){instance._start()}}};ALL.namespace("effects");ALL.effects={fadeIn:function(A,B){ALL.utils.hashMerge(A,{property:"opacity",from:0,to:1});return new ALL.effects.animate(A,B)},fadeOut:function(A,B){ALL.utils.hashMerge(A,{property:"opacity",from:1,to:0});return new ALL.effects.animate(A,B)},easing:{sin:function(C,A,D){var B;A>C?B=0:B=Math.PI/2;return Math.sin((((Math.PI/2)*D)/(A-C))+B)*Math.abs(A-C)}},animate:function(L,K){var D,J=this,A=null,G,B,C,I,E,F,H={};D={speed:500,fps:25,to:0,ease:ALL.effects.easing.sin};ALL.utils.hashMerge(D,L);if(!D.element||!D.property||(!(D.from||D.from==0)&&D.element.style[L.property]=="")){alert("ALL.animate::Błąd parametrów")}if(!(D.from||D.from==0)){D.from=D.element.style[L.property]||0}if((D.property=="opacity"&&typeof (D.element.style.opacity)==="undefined")||D.property=="filter"){J.opacityInIE=true;D.property="filter"}J._init=function(){I=parseInt((D.speed/1000)*D.fps);C=(parseFloat(D.to)-parseFloat(D.from))/I;J.current_step=0;E=1000/D.fps;F=D.element.style[D.property].replace(/\d+/,"")||D.from.toString().replace(/\d+/,"")||D.to.toString().replace(/\d+/,"");J.to=parseFloat(D.to);J.from=parseFloat(D.from);if(J.opacityInIE){D.element.style[D.property]="alpha(opacity="+parseInt(J.from*100)+")"}else{D.element.style[D.property]=J.from+F}};J._start=function(){A=setInterval(function(){J.animateStep()},E)};J._stop=function(){var M;clearInterval(A);if(typeof (K)==="function"){K(D)}};J.animateStep=function(){var N,O,M;J.current_step++;N=parseInt(D.element.style[D.property].replace(/[^\d]*([\d|\.]+)[^\d]*/,"$1"));J.current_step==I?O=J.to:O=parseFloat(D.ease(J.from,J.to,C*J.current_step));J.opacityInIE?M="alpha(opacity="+parseInt(O*100)+")":M=O+F;D.element.style[D.property]=M;if(J.current_step==I){J._stop()}};J._init();J._start()}};