if(!$("header").hasClass("rez")){function onscroll(){if($("nav.mobile").hasClass("is-active")){return true;}h=$("section.gora .logo").length==0?0:($("section.gora .logo").height());if($(window).scrollTop()>=h){$("header").addClass("showsm");}else{$("header").removeClass("showsm");}}$(function(){$(window).scroll(function(){onscroll();});onscroll();});}$(".hamburger").click(function(){$(".hamburger, #przyciemnionetlo, nav.mobile, #wrapper").toggleClass("is-active");onscroll();return false;});$("#przyciemnionetlo").click(function(){$(".hamburger, #przyciemnionetlo, nav.mobile, #wrapper").removeClass("is-active");onscroll();});
(function($){$.fn.svgmagic=function(givenOptions){var
defaultOptions={preloader:false,testmode:false,secure:false,callback:false,backgroundimage:false,dumpcache:false,temporaryHoldingImage:null,forceReplacements:false,handleBackgroundImages:false,additionalRequestData:{},postReplacementCallback:null,remoteServerUri:'http://bitlabs.nl/svgmagic/converter/3/',remoteRequestType:'POST',remoteDataType:'jsonp',debug:false,replacementUriCreator:null},untidyOptions=$.extend(defaultOptions,givenOptions),options=tidyOptions(untidyOptions),holdingImageTimeouts={},matchedNodes=this,images=[],imgElementName='img',srcAttributeName='src',backgroundImagePropertyName='background-image',urlMatcher=/^url\(["']?([^"'()]+)["']?\)$/,svgExtension=/\.svg$/,svgDataUri=/^data:image\/svg\+xml/,holdingImageTimeoutDuration=500,VERSION=3.0;if(window.location.protocol=="https:"||options.additionalRequestData.secure){options.remoteServerUri=options.remoteServerUri.replace("http://","https://");}log(false,"Using "+options.remoteServerUri+" as remote server");if(shouldPerformReplacement(options)){getReplacementUris(options,matchedNodes);}if(typeof JSON=='undefined'){if(typeof JSON!=="object"){JSON={}}(function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){escapable.lastIndex=0;return escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t==="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];if(a&&typeof a==="object"&&typeof a.toJSON==="function"){a=a.toJSON(e)}if(typeof rep==="function"){a=rep.call(t,e,a)}switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a){return"null"}gap+=indent;u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1){u[n]=str(n,a)||"null"}i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]";gap=o;return i}if(rep&&typeof rep==="object"){s=rep.length;for(n=0;n<s;n+=1){if(typeof rep[n]==="string"){r=rep[n];i=str(r,a);if(i){u.push(quote(r)+(gap?": ":":")+i)}}}}else{for(r in a){if(Object.prototype.hasOwnProperty.call(a,r)){i=str(r,a);if(i){u.push(quote(r)+(gap?": ":":")+i)}}}}i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}";gap=o;return i}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;if(typeof JSON.stringify!=="function"){JSON.stringify=function(e,t,n){var r;gap="";indent="";if(typeof n==="number"){for(r=0;r<n;r+=1){indent+=" "}}else if(typeof n==="string"){indent=n}rep=t;if(t&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":e})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i==="object"){for(n in i){if(Object.prototype.hasOwnProperty.call(i,n)){r=walk(i,n);if(r!==undefined){i[n]=r}else{delete i[n]}}}}return reviver.call(e,t,i)}var j;text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})()}function shouldPerformReplacement(opts){return opts.forceReplacements||!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");}function buildImageList(opts,nodes){var output=[];nodes.each(function(){var timeout,$this=$(this);if($this.attr(srcAttributeName)){var result=buildImageReference($this.attr(srcAttributeName),$this,false);if(result){output.push(result);if(opts.temporaryHoldingImage){timeout=setTimeout(function(){$this.attr(srcAttributeName,opts.temporaryHoldingImage);},holdingImageTimeoutDuration);holdingImageTimeouts[output.length-1]=timeout;}}}if(opts.handleBackgroundImages&&$this.css(backgroundImagePropertyName)&&$this.css(backgroundImagePropertyName)!='none'){var result=buildImageReference(urlMatcher.exec($this.css(backgroundImagePropertyName))[1],$this,true);if(result){output.push(result);}}});log(false,["Builded image list",output]);return output;}function buildImageReference(imageUri,element,isBackground){var output=null;if(svgExtension.test(imageUri)||svgDataUri.test(imageUri)){var tempImage=new Image();tempImage.src=imageUri;output={element:element,isBackground:isBackground,originalUri:tempImage.src,replacementUri:null};}return output;}function getReplacementUris(opts,nodes){var replacementFunction=opts.replacementUriCreator;images=buildImageList(opts,nodes);if(images.length>0){if(replacementFunction&&typeof replacementFunction=='function'){for(var i=0;i<images.length;i++){var image=images[i];image.replacementUri=replacementFunction(image.element,image.originalUri,image.isBackground);}performReplacements(opts);}else{getReplacementUrisFromRemoteService(opts);}}}function getReplacementUrisFromRemoteService(opts){var
sources=[],data={};for(var i=0;i<images.length;i++){sources.push(images[i].originalUri);}var baseUrl=window.location.href.split('/');$.extend(data,opts.additionalRequestData,{svgsources:sources,version:VERSION,origin:baseUrl[2]});$.ajax({dataType:opts.remoteDataType,method:opts.remoteRequestType,url:opts.remoteServerUri,data:data,timeout:3000,success:function(response,textStatus,jqXHR){for(var i=0;i<images.length;i++){var image=images[i],responseUri=response.images[i].image;image.replacementUri=responseUri;image.error=response.images[i].error;image.responseMsg=response.images[i].msg;image.filename=response.images[i].filename;}performReplacements(opts);},error:function(){log(true,"The request took longer than 3 seconds to complete. No image were replaced. Use the developer tools to check wheter the server responded with an error.")}});}function performReplacements(opts){for(var i=0;i<images.length;i++){var image=images[i],newUri=image.replacementUri;if(!newUri){log(true,image.filename+": No new url received");continue;}else if(image.error){log(true,image.filename+": "+image.responseMsg);continue;}else if(!image.isBackground){log(false,image.filename+": Image replaced. Server responded with: "+image.responseMsg);if(opts.temporaryHoldingImage){clearTimeout(holdingImageTimeouts[i]);}image.element.attr(srcAttributeName,newUri);}else{log(false,image.filename+": Background image replaced. Server responded with: "+image.responseMsg);image.element.css(backgroundImagePropertyName,'url("'+newUri+'")');}}if(opts.postReplacementCallback&&typeof opts.postReplacementCallback=='function'){opts.postReplacementCallback(images);}}function tidyOptions(originalOptions){if(!originalOptions.temporaryHoldingImage&&originalOptions.preloader&&typeof originalOptions.preloader=='string'){originalOptions.temporaryHoldingImage=originalOptions.preloader;}if(originalOptions.testmode&&typeof originalOptions.testmode=='boolean'){originalOptions.forceReplacements=true;}if(!originalOptions.postReplacementCallback&&originalOptions.callback&&typeof originalOptions.callback=='function'){originalOptions.postReplacementCallback=function(replacedImages){originalOptions.callback();};}if(!originalOptions.additionalRequestData['secure']){originalOptions.additionalRequestData.secure=originalOptions.secure;}if(!originalOptions.additionalRequestData['dumpcache']){originalOptions.additionalRequestData.dumpcache=originalOptions.dumpcache;}return originalOptions;}function log(error,msg){if(options.debug){if(error)console.error(msg)
else
console.log(msg);}}return this;};}(jQuery));
$(".newsletter A.ok").click(function(){$(".newsletform").submit();return false;});$(".tresc").imagesLoaded().always(function(){$(".tresc  img:not(.nierozszerzaj)").each(function(){if(this.naturalWidth<=630){$(this).addClass("nierozszerzaj");}});});$(document).ready(function(){var f=window.navigator.userAgent;var d=f.indexOf("MSIE ");var e=f.indexOf("Trident/");if(d>0||e>0){$("img").svgmagic({forceReplacements:true});$("A, h5").svgmagic({forceReplacements:true,handleBackgroundImages:true});}else{}});if($(".logotypylista").length>0){$(document).ready(function(){});}$(document).keydown(function(b){if(b.keyCode==27){pop=$("#popup");if(pop&&pop.is(":visible")&&pop.find(".krzyzyk").is(":visible")){closePopup();}}});$(".video .play").click(function(b){p=$(this).closest(".video");if($(b.target).hasClass("videoheader")){return true;}yt=p.attr("data-video");ht="<div class='video-cont'><iframe src=\"https://www.youtube.com/embed/"+yt+'?rel=0&amp;controls=1&amp;modestbranding=1&amp;showinfo=0&amp;autoplay=1" frameborder="0" allowfullscreen=\'1\'></iframe></div>';if(p.hasClass("news-box")||p.hasClass("video-box")){p.find(".image").css("background-image","none").addClass("playing").html(ht);p.find(".play").fadeOut();p.find(".dofilmu").fadeOut();}else{p.siblings(".tresc.hed").css("margin-top","0px");p.find(".overlay").html(ht);}return false;});if($("section.formularz").length>0){$("body").addClass("formbody");}$(".formularz select").niceSelect();$("font.required").prev("input,textarea,select").addClass("reqinput");
