$(document).ready(function(){function sp(l, v){document.documentElement.style.setProperty(l, v);}sp("--background-color", "#ffffff");sp("--background-color-value", "#ffffff");sp("--background-file", "url(data/images/)");sp("--background-repeat", "no-repeat");sp("--background-position", "normal");sp("--text-color", "#000000");sp("--text-color-value", "#000000");sp("--font-name", "Arial");sp("--font", "16px");sp("--fontmobile", "30px");sp("--line-height", "20px");sp("--line-height-mobile", "34px");sp("--odstep", "102px");sp("--odstepwmenu", "1px");sp("--wysokoscmenu", "50px");sp("--font-name-menu", "TeXGyrePagella");sp("--fontmenu", "25px");sp("--odsteplabel", "102px");sp("--odstepwmenulabel", "1px");sp("--wysokoscmenulabel", "50px");sp("--font-name-menu", "TeXGyrePagella");sp("--fontmobilemenu", "40px");sp("--fontmenubold", "bold");sp("--text-color-menu", "#683301");sp("--back-color-menu", "#683301");sp("--back-color-menu-trans", "on");sp("--menu-trans", "on");sp("--menu-trans-color", "#000000");sp("--menu-trans-h", "0px");sp("--menu-trans-h-label", "0px");sp("--menu-trans-v", "0px");sp("--menu-trans-v-label", "0px");sp("--menu-trans-r", "0px");sp("--menu-trans-r-label", "0px");sp("--text-shadow-opacity", "0");sp("--text-shadow-opacity-label", "0");sp("--text-shadow", "0px 0px 0px rgba(0, 0, 0, 0)");$('a[href^="#"]').on('click',function(e){e.preventDefault();var target = this.hash,$target = $(target);$('html, body').stop().animate({'scrollTop': $target.offset().top}, 900, 'swing', function(){window.location.hash = target;});});function Preview(img){var imagebox='
'+'

'+'
';$('#preview').html(imagebox);$('#content').css('opacity', 0);$('#preview').show();$('#content').fadeTo(500, 1);}$(document).keydown(function(event){if(event.keyCode === 27){$("#preview").hide();}});$("#preview").click(function(){$("#preview").hide();});$("img.preview").click(function(){var img = $(this).attr('src').replace("_m.jpg", ".jpg");Preview(img);});function isNumeric(n){re=/^-?(\d{1,3}|\d{1,3}(\,\d{3})*|\d*)$/g;if(!re.test(n)) return false;return true;}function SA_left(ua){var cA=ua.split("/");if(cA.length>1){var el=$('.pictures1');var ile=el.width();var kolumn=Math.floor(ile/160);if(cA[cA.length-1]==''||cA[cA.length-1]=='#realizacje'||cA[cA.length-1]=='#oferta'||cA[cA.length-1]=='#kontakt'){cA[cA.length-1]='#g1_1'; var tC=cA[cA.length-1].replace('#g1_', '');tC=tC.replace('#g2_', '');if(!isNaN(parseInt(tC))){if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)-2)>=1) tC=parseInt(tC)-2;}}else tC=1;cA[cA.length-1]='#g1_'+tC.toString();}else{var tC=cA[cA.length-1].replace('#g1_', '');tC=tC.replace('#g2_', '');if(!isNaN(parseInt(tC)))if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)-2)>=1) tC=parseInt(tC)-2;}else tC=1;cA[cA.length-1]='#g1_'+tC.toString();}}var nA=cA.join("/");return nA;}function SA_left2(ua){var cA=ua.split("/");if(cA.length>1){var el=$('.pictures2');var ile=el.width();var kolumn=Math.floor(ile/160);if(cA[cA.length-1]==''||cA[cA.length-1]=='#realizacje'||cA[cA.length-1]=='#oferta'||cA[cA.length-1]=='#kontakt'){cA[cA.length-1]='#g2_1'; var tC=cA[cA.length-1].replace('#g2_', '');tC=tC.replace('#g1_', '');if(!isNaN(parseInt(tC))){if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)-2)>=1) tC=parseInt(tC)-2;}}else tC=1;cA[cA.length-1]='#g2_'+tC.toString();}else{var tC=cA[cA.length-1].replace('#g2_', '');tC=tC.replace('#g1_', '');if(!isNaN(parseInt(tC)))if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)-2)>=1) tC=parseInt(tC)-2;}else tC=1;cA[cA.length-1]='#g2_'+tC.toString();}}var nA=cA.join("/");return nA;}function SA_right(ua){var me=$('#cp').html();var cA=ua.split("/");if(cA.length>1){var el=$('.pictures1');var ile=el.width();var kolumn=Math.floor(ile/260);if(cA[cA.length-1]==''||cA[cA.length-1]=='#realizacje'||cA[cA.length-1]=='#oferta'||cA[cA.length-1]=='#kontakt'){cA[cA.length-1]='#g1_1'; var tC=cA[cA.length-1].replace('#g1_', '');if(!isNaN(parseInt(tC))){if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)+2)(kolumn*2)) {if((parseInt(tC)+2)1){var el=$('.pictures2');var ile=el.width();var kolumn=Math.floor(ile/260);if(cA[cA.length-1]==''||cA[cA.length-1]=='#realizacje'||cA[cA.length-1]=='#oferta'||cA[cA.length-1]=='#kontakt'){cA[cA.length-1]='#g2_1'; var tC=cA[cA.length-1].replace('#g2_', '');if(!isNaN(parseInt(tC))){if(parseInt(tC)>(kolumn*2)) {if((parseInt(tC)+2)(kolumn*2)) {if((parseInt(tC)+2)