(function(a){a.fn.extend({accordion:function(){return this.each(function(){if(a(this).data("accordiated")){return false}a.each(a(this).find("ul, li>div"),function(){a(this).data("accordiated",true);a(this).hide()});a.each(a(this).find("a:not(.foo)"),function(){a(this).click(function(d){b(d.target);return void (0)})});var c=false;if(location.hash){c=a(this).find("a[href="+location.hash+"]")[0]}else{if(a(this).find("li.current")){c=a(this).find("li.current a")[0]}}if(c){b(c,"toggle","parents");a(c).parents().show()}function b(f,e,d){a(f)[(d||"parent")]("li").toggleClass("active").siblings().removeClass("active").children("ul, div").slideUp("fast");a(f).siblings("ul, div")[(e||"slideToggle")]((!e)?"fast":null)}})}})})(jQuery);(function(c){function b(g,m,j){var f,h,l=g.width,i=g.width,n,o;o=c(g.parentNode);if(c.browser.msie){this.element=f=o.append("<img class='reflection' style='position:absolute'/>").find(":last")[0];f.src=g.src;f.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(j*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(m/i*100)+")"}else{this.element=f=o.append("<canvas class='reflection' style='position:absolute'/>").find(":last")[0];if(!f.getContext){return}h=f.getContext("2d");try{c(f).attr({width:l,height:m});h.save();h.translate(0,i-1);h.scale(1,-1);h.drawImage(g,0,0,l,i);h.restore();h.globalCompositeOperation="destination-out";n=h.createLinearGradient(0,0,0,m);n.addColorStop(0,"rgba(255, 255, 255, "+(1-j)+")");n.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=n;h.fillRect(0,0,l,m)}catch(k){return}}c(f).attr({alt:c(g).attr("alt"),title:c(g).attr("title")})}var a=function(f,e){this.orgWidth=f.width;this.orgHeight=f.height;this.image=f;this.reflection=null;this.alt=f.alt;this.title=f.title;this.imageOK=false;this.options=e;this.imageOK=true;if(this.options.reflHeight>0){this.reflection=new b(this.image,this.options.reflHeight,this.options.reflOpacity)}c(this.image).css("position","absolute")};var d=function(h,f,j){var i=[],k=Math.sin,e=Math.cos,g=this;this.controlTimer=0;this.stopped=false;this.container=h;this.xRadius=j.xRadius;this.yRadius=j.yRadius;this.showFrontTextTimer=0;this.autoRotateTimer=0;if(j.xRadius===0){this.xRadius=(c(h).width()/2.3)}if(j.yRadius===0){this.yRadius=(c(h).height()/6)}this.xCentre=j.xPos;this.yCentre=j.yPos;this.frontIndex=0;this.rotation=this.destRotation=Math.PI/2;this.timeDelay=1000/j.FPS;if(j.altBox!==null){c(j.altBox).css("display","block");c(j.titleBox).css("display","block")}c(h).css({position:"relative",overflow:"hidden"});c(j.buttonLeft).css("display","inline");c(j.buttonRight).css("display","inline");c(j.buttonLeft).bind("mouseup",this,function(l){l.data.rotate(-1);return false});c(j.buttonRight).bind("mouseup",this,function(l){l.data.rotate(1);return false});if(j.mouseWheel){c(h).bind("mousewheel",this,function(l,m){l.data.rotate(m);return false})}c(h).bind("mouseover",this,function(l){clearInterval(l.data.autoRotateTimer);var m=c(l.target).attr("alt");if(m!==undefined&&m!==null){clearTimeout(l.data.showFrontTextTimer);c(j.altBox).html((c(l.target).attr("alt")));c(j.titleBox).html((c(l.target).attr("rel")))}});c(h).bind("mouseout",this,function(m){var l=m.data;clearTimeout(l.showFrontTextTimer);l.showFrontTextTimer=setTimeout(function(){l.showFrontText()},1000);l.autoRotate()});c(h).bind("mousedown",this,function(l){l.data.container.focus();return false});h.onselectstart=function(){return false};this.innerWrapper=c(h).wrapInner('<div style="position:absolute;width:100%;height:100%;"/>').children()[0];this.showFrontText=function(){if(i[this.frontIndex]===undefined){return}c(j.titleBox).html(c(i[this.frontIndex].image).attr("rel"));c(j.altBox).html(c(i[this.frontIndex].image).attr("alt"))};this.go=function(){if(this.controlTimer!==0){return}var l=this;this.controlTimer=setTimeout(function(){l.updateAll()},this.timeDelay)};this.stop=function(){clearTimeout(this.controlTimer);this.controlTimer=0};this.rotate=function(l){this.frontIndex-=l;if(this.frontIndex<0){this.frontIndex=i.length-1}if(this.frontIndex>i.length-1){this.frontIndex=0}this.destRotation+=(Math.PI/i.length)*(2*l);this.showFrontText();this.go()};this.autoRotate=function(){if(j.autoRotate!=="no"){var l=(j.autoRotate==="right")?1:-1;this.autoRotateTimer=setInterval(function(){g.rotate(l)},j.autoRotateDelay)}};this.updateAll=function(){var F=j.minScale;var r=(1-F)*0.5;var p,C,o,n,H,E,v;var q=(this.destRotation-this.rotation);var u=Math.abs(q);this.rotation+=q*j.speed;if(u<0.001){this.rotation=this.destRotation}var B=i.length;var m=(Math.PI/B)*2;var G=this.rotation;var t=c.browser.msie;this.innerWrapper.style.display="none";var D;var s="px",z;var l=this;for(var A=0;A<B;A++){E=i[A];v=k(G);H=((v+1)*r)+F;o=this.xCentre+(((e(G)*this.xRadius)-(E.orgWidth*0.5))*H);n=this.yCentre+(((v*this.yRadius))*H);if(E.imageOK){var I=E.image;p=I.width=E.orgWidth*H;C=I.height=E.orgHeight*H;I.style.left=o+s;I.style.top=n+s;I.style.zIndex=(H*100)>>0;if(E.reflection!==null){z=j.reflHeight*H;D=E.reflection.element.style;D.left=o+s;D.top=n+C+j.reflGap*H+s;D.width=p+s;if(t){D.filter.finishy=(z/C*100)}else{D.height=z+s}}}G+=m}this.innerWrapper.style.display="block";if(u>=0.001){this.controlTimer=setTimeout(function(){l.updateAll()},this.timeDelay)}else{this.stop()}};this.checkImagesLoaded=function(){var l;for(l=0;l<f.length;l++){if((f[l].width===undefined)||((f[l].complete!==undefined)&&(!f[l].complete))){return}}for(l=0;l<f.length;l++){i.push(new a(f[l],j))}clearInterval(this.tt);this.showFrontText();this.autoRotate();this.updateAll()};this.tt=setInterval(function(){g.checkImagesLoaded()},50)};c.fn.CloudCarousel=function(e){this.each(function(){e=c.extend({},{reflHeight:0,reflOpacity:0.5,reflGap:0,minScale:0.5,xPos:0,yPos:0,xRadius:0,yRadius:0,altBox:null,titleBox:null,FPS:30,autoRotate:"no",autoRotateDelay:1500,speed:0.2,mouseWheel:false},e);c(this).data("cloudcarousel",new d(this,c(".cloudcarousel",c(this)),e))});return this}})(jQuery);(function(a){a.fn.jFlow=function(d){var c=a.extend({},a.fn.jFlow.defaults,d);var b=0;var f=a(".jFlowControl").length;a(this).find(".jFlowControl").each(function(g){a(this).click(function(){a(".jFlowControl").removeClass("jFlowSelected");a(this).addClass("jFlowSelected");var h=Math.abs(b-g);a(c.slides).animate({marginLeft:"-"+(g*a(c.slides).find(":first-child").width()+"px")},c.duration*(h));b=g})});a(c.slides).before('<div id="jFlowSlide"></div>').appendTo("#jFlowSlide");a(c.slides).find("div").each(function(){a(this).before('<div class="jFlowSlideContainer"></div>').appendTo(a(this).prev())});a(".jFlowControl").eq(b).addClass("jFlowSelected");var e=function(g){a("#jFlowSlide").css({position:"relative",width:c.width,height:c.height,overflow:"hidden"});a(c.slides).css({position:"relative",width:a("#jFlowSlide").width()*a(".jFlowControl").length+"px",height:a("#jFlowSlide").height()+"px",overflow:"hidden"});a(c.slides).children().css({position:"relative",width:a("#jFlowSlide").width()+"px",height:a("#jFlowSlide").height()+"px","float":"left"});a(c.slides).css({marginLeft:"-"+(b*a(c.slides).find(":first-child").width()+"px")})};e();a(window).resize(function(){e()});a(".jFlowPrev").click(function(){if(b>0){b--}else{b=f-1}a(".jFlowControl").removeClass("jFlowSelected");a(c.slides).animate({marginLeft:"-"+(b*a(c.slides).find(":first-child").width()+"px")},c.duration);a(".jFlowControl").eq(b).addClass("jFlowSelected")});a(".jFlowNext").click(function(){if(b<f-1){b++}else{b=0}a(".jFlowControl").removeClass("jFlowSelected");a(c.slides).animate({marginLeft:"-"+(b*a(c.slides).find(":first-child").width()+"px")},c.duration);a(".jFlowControl").eq(b).addClass("jFlowSelected")})};a.fn.jFlow.defaults={easing:"swing",duration:400,width:"100%"}})(jQuery);function pokazIMG(a){if(document.getElementById){document.getElementById("imgbox").src=a.href;if(a.title){document.getElementById("linkbox").href=a.title}else{document.getElementById("linkbox").href=a.childNodes[0].nodeValue}return false}else{return true}};(function(a){a.fn.extend({imghover:function(b){return this.each(function(){b=a.extend({prefix:"",suffix:"-hover",src:"",btnOnly:true,fade:true,fadeSpeed:125,preload:true},b||{});var g=a(this);if(!g.is("img")&&!g.is(":image")){var h="img,:image";if(b.btnOnly){h="a "+h}g.find(h).imghover(b);return}var c=g.attr("src");var d;if(b.src){d=b.src}else{d=c;if(b.prefix){var j=d.lastIndexOf("/");if(j>0){d=d.substr(0,j-1)+b.prefix+d.substr(j-1)}else{d=b.prefix+d}}if(b.suffix){var j=d.lastIndexOf(".");if(j>0){d=d.substr(0,j)+b.suffix+d.substr(j)}else{d=d+b.suffix}}}if(b.fade){var i=g.offset();var e=g.clone(true);e.attr("src",d);g.wrap("<div />");var f=a(g).parent();f.css({position:"relative",zIndex:1000});e.css({zIndex:999,position:"absolute",left:"0",top:"0"}).hide().insertAfter(g);f.hover(function(){var k=g.offset();e.css({left:"0",top:"0"});e.stop(true,true).fadeIn(b.fadeSpeed)},function(){g.stop(true,true).fadeIn(b.fadeSpeed);e.stop(true,true).fadeOut(b.fadeSpeed)})}else{if(b.preload){jQuery("<img>").attr("src",d)}g.hover(function(){g.attr("src",d)},function(){g.attr("src",c)})}})}})})(jQuery);(function(a){a.fn.extend({fadehover:function(){return this.each(function(){var f=a(this);var b=f.height();var e=f.width();f.wrap('<div style="position: relative; height: '+b+"px; width: "+e+'px; float:left" />');var c=f.css("background-image").split('"');if(c.length>1){c=c[c.length-2].split("/")}else{c=f.css("background-image").split("/")}var h=c[c.length-2];c=c[c.length-1].split(".");var g=c[0]+"-hover";var i=c[1];if(i.indexOf(")")!=-1){i=i.replace(")","")}var d=f.clone();d.css({"background-image":"url(img/"+h+"/"+g+"."+i+")",position:"absolute",left:"0px",top:"0px"});f.after(d);f.css({position:"absolute",left:"0px",top:"0px","z-index":"10"});f.hover(function(){a(this).stop().animate({opacity:"0"},125)},function(){a(this).stop().animate({opacity:"1"},125)})})}})})(jQuery);
