var oCGR,cGR,_oGA={kody:["UA-969241-2"],transakcja:null,przedmioty:null,domena:".gratka.pl",zmienne:[]};var oG_OSA=oG_OSA||{};if(!oG_OSA.debug){oG_OSA.debug=0}if(!oG_OSA.pobranePliki){oG_OSA.pobranePliki=[]}var onloadLista=[],wykonajNaKoncuLista=[],sUrl=oG_OSA.sUrl||"";if(sUrl){if(-1===sUrl.indexOf("http://")){sUrl="http://"+sUrl}}window.onerror=function(c,b,a){if(1===oG_OSA.debug){return false}return true};Object.beget=function(b){var a=function(){};a.prototype=b;return new a()};Function.prototype.rozszerz=function(b,a){if(!this.prototype[b]){this.prototype[b]=a}};String.rozszerz("trim",function(){return this.replace(/(^[\s\xA0]+|[\s\xA0]+$)/g,"")});String.rozszerz("toObject",function(){return eval("("+this+")")});String.rozszerz("ucfirst",function(){var a=this.charAt(0).toUpperCase();return a+this.substr(1)});Array.rozszerz("indexOf",function(d,a){var b=0,c=this.length;a=a||0;for(b=a;b<c;b+=1){if(this[b]===d){return b}}return -1});Array.rozszerz("lastIndexOf",function(c,a){if(a===null||a>=this.length){a=this.length-1}for(var b=a;b>=0;b-=1){if(this[b]===c){return b}}return -1});Array.rozszerz("contains",function(a){return this.indexOf(a)>-1});function czytajOnload(){for(var a=0;a<onloadLista.length;a+=1){onloadLista[a]()}}function wykonajNaKoncu(){try{for(var b=0;b<wykonajNaKoncuLista.length;b+=1){wykonajNaKoncuLista[b]()}}catch(a){}}function GR(){var h="",d=arguments,b=d.length,j,m,g=0,e=0,k;if(!oCGR){oCGR=new cGR()}if(b){j=d[0]+"#"+b;if(!oCGR[j]&&oCGR[d[0]]){m="return this."+d[0]+"(";for(e=1;e<b;e+=1){m+=(e!==1?",":"")+"a["+e+"]"}m+=")";oCGR[j]=new Function("a",m)}if(oCGR[j]){h=oCGR[j](d)}else{k=d[0].split("_");if(k[0]==="o"||k[0]==="p"){GR("zaladujPlikJS",sUrl+"/"+k[0].toLowerCase()+"/js/cgr/"+k[1].toLowerCase()+".js","head",function(){m="if (typeof this."+d[0]+" === 'function') { return this."+d[0]+"(";for(e=1;e<b;e+=1){m+=(e!==1?",":"")+"a["+e+"]"}m+=")}else{return 0}";oCGR[j]=new Function("a",m);if(oCGR[j]){h=oCGR[j](d)}})}else{return 0}}}else{h=0}return h}var Zdarzenia={};Zdarzenia.zaczep=function(b,c,a){if(b.addEventListener){b.addEventListener(c,a,false)}else{if(b.attachEvent){b.attachEvent("on"+c,a)}else{b["on"+c]=a}}};Zdarzenia.odczep=function(b,c,a){if(b.removeEventListener){b.removeEventListener(c,a,false)}else{if(b.detachEvent){b.detachEvent("on"+c,a)}else{b["on"+c]=null}}};Zdarzenia.formatuj=function(a){if(GR("czyIE")){a.charCode=a.keyCode||0;a.eventPhase=2;a.isChar=(a.charCode>0);a.pageX=a.clientX+document.body.scrollLeft;a.pageY=a.clientY+document.body.scrollTop;a.preventDefault=function(){a.returnValue=false};a.stopPropagation=function(){a.cancelBubble=true};if(a.type==="mouseout"){a.relatedTarget=a.toElement}else{if(a.type==="mouseover"){a.relatedTarget=a.fromElement}}a.target=a.srcElement;a.timeStamp=(new Date()).getTime()}return a};Zdarzenia.pobierz=function(){if(window.event){return this.formatuj(window.event)}else{return Zdarzenia.pobierz.caller.arguments[0]}};cGR=function(){this.wersja=(oG_OSA.debug===1?(Math.random()).toString().substring(2,11):"1.5.1b");this.sPrzegladarka=navigator.userAgent.toLowerCase();this.sS="%3Cscript%20type%3D%22text%2Fjavascript%22%3E";this.eS="%3C%2Fscript%3E"};cGR.prototype={czyIE:function(a){if(a){return(this.sPrzegladarka.indexOf("msie "+a)>-1)}return !!(window.attachEvent&&this.sPrzegladarka.indexOf("opera")===-1)},czyOpera:function(){return(this.sPrzegladarka.indexOf("opera")>-1)},czyWebKit:function(){return(this.sPrzegladarka.indexOf("applewebkit/")>-1)},czyGecko:function(){return(this.sPrzegladarka.indexOf("gecko")>-1&&this.sPrzegladarka.indexOf("khtml")===-1)},czyMobileSafari:function(){return !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},pobierzWersje:function(){return this.wersja},$:function(f){if(f&&(arguments.length>1||f instanceof Array)){var c=arguments.length>1?arguments:f,e=0,d=[],b=c.length;for(e=0;e<b;e+=1){d.push(GR("$",c[e]))}return d}if("object"===typeof f){return f}if("string"===typeof f){return document.getElementById(f)}return null},$$:function(){var j=[],f,h=0,e=0,c=arguments,g=c[1]||document,b=c[2]||"*",d=c[0]+":"+g+":"+b;if("undefined"!==typeof oG_OSA[d]&&"undefined"===typeof c[3]){return oG_OSA[d]}f=g.getElementsByTagName(b);h=f.length;for(e=0;e<h;e+=1){if(this.czyCssClass(f[e],c[0])){j.push(f[e])}}oG_OSA[d]=j;return j},relParam:function(a,f){var d,b={},e,c=0;f=f||0;if(a.match(new RegExp("(^{.*}$)"))){return a.zwrocObiekt()}e=a.split(" ");a=e[0].split("-");if(!f){a.shift()}for(c=0;c<a.length;c+=1){d=a[c].split(":");b[d[0]]=d[1]||false}return b},czyCssClass:function(b,a){b=this.$(b);return b&&b.className.match(new RegExp("(^|\\s)"+a+"(\\s|$)"))},pobierzCssClass:function(a){a=this.$(a);return(a?a.className:null)},ustawCssClass:function(b,a){b=this.$(b);return(b?b.className=a:null)},dodajCssClass:function(b,a){b=this.$(b);if(!this.czyCssClass(b,a)){b.className=b.className.trim()!==""?b.className+" "+a:a}return b.className},usunCssClass:function(c,a,b){c=this.$(c);b=b||"";if(this.czyCssClass(c,a)){c.className=c.className.replace(new RegExp(a+"(\\s|$)"),b)}if(""===c.className.trim()){c.removeAttribute("class")}return c.className},ustawReguleCss:function(b,a){b=this.$(b);if(!b){return}if(GR("czyIE")){b.style.setAttribute("cssText",a)}else{b.style.cssText=a}if(!a){b.removeAttribute("style")}},utworzElement:function(g,a,c,f,b){g=this.$(g)||document.body;var e=document.createElement(a),d;f=f||"def";b=b||null;for(d in c){if("function"!==typeof c[d]){switch(d){case"style":this.ustawReguleCss(e,c[d]);break;case"class":this.ustawCssClass(e,c[d]);break;default:e.setAttribute(d,c[d]);break}}}if(b){this.utworzTekst(e,b)}switch(f){case"pierwszy":g.insertBefore(e,g.firstChild);break;case"po":g.parentNode.insertBefore(e,g.nextSibling);break;default:g.appendChild(e);break}return e},usunElement:function(a){a=$(a);if(!a){return}a.parentNode.removeChild(a)},wstawHTML:function(b,a){this.$(b).innerHTML=a},wpisz:function(a){document.write(a)},wpiszSkrypt:function(c,b){b=b||"wpisz";var e=document,a;if(b==="wpisz"){e.write(unescape(this.sS)+c+unescape(this.eS))}else{if(b==="head"){a=e.createElement("script");a.setAttribute("type","text/javascript");this.utworzTekst(a,c);e.getElementsByTagName("head")[0].appendChild(a)}}},dodajOnload:function(a){if(this.czyIE){window.onload=czytajOnload;onloadLista[onloadLista.length]=a}else{if(window.onload){if(window.onload!==czytajOnload){onloadLista[0]=window.onload;window.onload=czytajOnload}onloadLista[onloadLista.length]=a}else{window.onload=a}}},dodajWykonajNaKoncu:function(a){wykonajNaKoncuLista[wykonajNaKoncuLista.length]=a},zaladujPlikJS:function(c,e,i,a){var h=document,b,f,j;e=e||"head";i=i||0;a=a||0;try{if(oG_OSA.pobranePliki[c]&&oG_OSA.pobranePliki[c]===1){if("function"===typeof i){i()}return}b=c+(c.indexOf("?")+1?"&":"?")+this.pobierzWersje();if(h.getElementsByTagName("head")&&e==="head"){j=document.createElement("script");if(typeof i==="function"){if(GR("czyIE")){j.onreadystatechange=function(){if(/loaded|complete/.test(this.readyState)){i();oG_OSA.pobranePliki[c]=1}}}else{j.onload=function(){i();oG_OSA.pobranePliki[c]=1}}}j.setAttribute("type","text/javascript");j.setAttribute("src",b);if(a){j.setAttribute("defer","true")}h.getElementsByTagName("head")[0].appendChild(j)}else{if(e==="plik"){f="%3Cscript%20type%3D%22text%2Fjavascript%22%20src%3D%22"+b+"%22%3E";h.write(unescape(f)+unescape(this.eS))}}}catch(g){}},zaladujPlikCSS:function(c){if(typeof oG_OSA.pobranePliki[c]!=="undefined"&&oG_OSA.pobranePliki[c]===1){return}var a=c+(c.indexOf("?")+1?"&":"?")+this.pobierzWersje(),b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");b.setAttribute("href",a);document.getElementsByTagName("head")[0].appendChild(b)},utworzTekst:function(b,a){b=typeof b==="object"?b:GR("$",b);if(null===b.canHaveChildren||b.canHaveChildren){b.appendChild(document.createTextNode(a))}else{b.text=a}}};cGR.prototype.zmienCssClass=cGR.prototype.usunCssClass;cGR.prototype.zaczepZdarzenie=function(c,b,a,d){Zdarzenia.zaczep(this.$(c),b,a)};cGR.prototype.odczepZdarzenie=function(c,b,a){Zdarzenia.odczep(this.$(c),b,a)};cGR.prototype.przetworzLinki=function(){var e,b,a,d,f=[],c=document.getElementsByTagName("a"),g=c.length,j={external:{target:"_blank"},popup:{click:function(){GR("pokazPopup",this);return false}},modul:{click:function(){GR("o_warstwaPrzykrywajaca_pokazModul",this);return false}},kadr_warstwa:{click:function(){GR("o_kadrowanie_inicjalizuj",this);return false}},zakladka:{click:function(){GR("o_zakladki_wykonaj",this);return false},obiekt:"zakladka"}},m=function(){return false};for(e=0;e<g;e+=1){d=c[e].getAttribute("rel")||0;if(d){for(b in j){if("function"!==typeof j[b]){if(d.indexOf(b)===0){for(a in j[b]){switch(a){case"target":c[e].target=j[b][a];break;case"obiekt":var h=GR("relParam",d,1);if(!oG_OSA[j[b][a]]){oG_OSA[j[b][a]]={}}if(!oG_OSA[j[b][a]][h.id]){oG_OSA[j[b][a]][h.id]=c[e]}break;default:if(GR("czyCssClass",c[e].parentNode,"wyszarzony")){c[e].onclick=m;break}c[e].onclick=j[b][a];break}}}}}}}};cGR.prototype.pobierzPozycjeScroll=function(){var a=document.documentElement,b=document.body;if(self.pageYOffset){return[self.pageXOffset,self.pageYOffset]}if(a&&a.scrollTop){return[a.scrollLeft,a.scrollTop]}if(b){return[b.scrollLeft,b.scrollTop]}return[0,0]};cGR.prototype.pobierzRozmiary=function(){var b,a,c,h,i,d,f=document.documentElement,g=document.body,e=window;if(e.innerHeight&&e.scrollMaxY){i=g.scrollWidth;d=e.innerHeight+e.scrollMaxY}else{if(g.scrollHeight>g.offsetHeight){i=g.scrollWidth;d=g.scrollHeight}else{i=g.offsetWidth;d=g.offsetHeight}}if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(f&&f.clientHeight){b=f.clientWidth;a=f.clientHeight}else{if(g){b=g.clientWidth;a=g.clientHeight}}}c=(i<b)?b:i;h=(d<a)?a:d;return[c,h,b,a,screen.width,screen.height]};cGR.prototype.pobierzPozycje=function(c){c=this.$(c);var b=0,a=0;while(c.tagName!=="HTML"){b+=c.offsetTop||0;a+=c.offsetLeft||0;if(c.offsetParent){c=c.offsetParent}else{break}}b+=c.offsetTop||0;a+=c.offsetLeft||0;return{x:a,y:b}};cGR.prototype.pokazPopup=function(g){var d=[],c,a=g.getAttribute("rel"),f=GR("relParam",a),e=GR("pobierzRozmiary"),b={scrollbars:0,channelmode:0,directories:0,fullscreen:0,resizable:0,toolbar:0,location:0,menubar:0,status:0,titlebar:0,width:750,height:550,left:0,top:0};f.width=f.s||f.width;f.height=f.w||f.height;f.left=f.l||Math.floor((e[4]-f.width)/2);f.top=f.g||Math.floor((e[3]-f.height)/2);for(c in b){if("function"!==typeof f[c]){if(f[c]){d.push(c+"="+f[c])}else{d.push(c+"="+b[c])}}}window.open(g.href,"",d.join())};cGR.prototype.pokazUkryj=function(f,a,e){var c=this.$(f),d=c.length,b=0;a=a||[];e=e||"block";for(b=0;b<d;b+=1){if(!c[b]){continue}if("undefined"===typeof a[b]){a[b]=c[b].style.display==="none"?1:0}if(a[b]){c[b].style.display=e}else{c[b].style.display="none"}}return false};cGR.prototype.inicjalizujGemiusHeatMap=function(){try{window.ghmxy_align="center";window.ghmxy_type="absolute";window.ghmxy_identifier="bOtLa5QakD3ll8BxlHcT6Je.rtEsAcMm2rn093IxryX.m7";GR("zaladujPlikJS","http://pro.hit.gemius.pl/hmapxy.js","plik")}catch(a){}};cGR.prototype.gemius=function(b){try{var e={xaudience:"http://pro.hit.gemius.pl/xgemius.js",audience:"http://arbo.hit.gemius.pl/pp_gemius.js",traffic:"http://s.gratka.pl/o/js/gemius.js"},a={xaudience:"pp_gemius_identifier",audience:"pp_gemius_identifier",traffic:"gemius_identifier"},c;for(c in b){if("function"!==typeof b[c]){window[(!a[c]?c:a[c])]=b[c];GR("zaladujPlikJS",e[c],"plik")}}}catch(d){}};cGR.prototype.Gemius=function(a){this.dodajWykonajNaKoncu(function(){GR("gemius",a)})};cGR.prototype.GAustawDomyslny=function(a,b){_oGA.kody[0]=a||_oGA.kody[0];_oGA.domena=b||_oGA.domena};cGR.prototype.GAdodajKodSledzacy=function(a){_oGA.kody.push(a)};cGR.prototype.GAdodajTransakcje=function(a,b){_oGA.transakcja=a;_oGA.przedmioty=b};cGR.prototype.GAustawZmienna=function(a){_oGA.zmienne.push(a)};cGR.prototype.GoogleAnalytics=function(){if(location.host.indexOf(_oGA.domena)===-1){return}try{var c,b=("https:"===document.location.protocol)?"https://ssl.":"http://www.";b+="google-analytics.com/ga.js";var d=function(){var k=[],g,j,h,e=_oGA.kody.length;for(g=0;g<e;g+=1){k[g]=_gat._getTracker(_oGA.kody[g]);k[g]._setDomainName(_oGA.domena);k[g]._trackPageview()}if(_oGA.transakcja){var f=_oGA.transakcja;k[0]._addTrans(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]);for(g=0;g<_oGA.przedmioty.length;g++){var l=_oGA.przedmioty[g];k[0]._addItem(l[0],l[1],l[2],l[3],l[4],l[5])}k[0]._trackTrans()}if(_oGA.zmienne.length){for(g=0;g<_oGA.zmienne.length;g+=1){k[0]._setVar(_oGA.zmienne[g])}}if("undefined"===typeof oG_OSA.GAtracker){oG_OSA.GAtracker=k[0]}};GR("zaladujPlikJS",b,"",d)}catch(a){}};cGR.prototype.usunWezelTekstowy=function(c,a){a=a||"default";try{if(c&&3===c.nodeType){switch(a){case"previous":return c.previousSibling;case"next":return c.nextSibling;default:return c.parentNode}}}catch(b){}return c};cGR.prototype.DOM_pobierzListeDzieci=function(d){d=GR("$",d);if(!d){return[]}var a=[],c=d.firstChild;if(GR("czyIE")){a.push(c)}function b(e){do{e=e.nextSibling}while(e&&1!==e.nodeType);return e}do{c=b(c);if(c){a.push(c)}}while(c);return a};cGR.prototype.ustawCookie=function(a,g,h,e,c,d){var b=[a+"="+escape(g)],j,f;if(h instanceof Date){h=h.toGMTString()}else{if("number"===typeof h){h=(new Date(+(new Date())+(h*1000))).toGMTString()}}j={expires:h||0,path:e||0,domain:c||0,secure:d||0};for(f in j){if(j[f]&&"function"!==typeof j[f]){b.push(f+"="+j[f])}}document.cookie=b.join(";")};cGR.prototype.pobierzCookie=function(b){var a=new RegExp("(?:;)?"+b+"=([^;]*);?");if(a.test(document.cookie)){return decodeURIComponent(RegExp.$1)}return null};cGR.prototype.usunCookie=function(a,b){if(this.pobierzCookie(a.nazwa)){document.cookie=a.nazwa+"="+(a.sciezka?";path="+a.sciezka:"")+(a.domena?";domain="+a.domena:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}if("function"===typeof b){b()}};cGR.rozszerz("rejestr",function(){var a=oG_OSA.serwis||"nn",b;if(!oG_OSA[a]){oG_OSA[a]={}}b=oG_OSA[a];return{dodaj:function(c,d){b[c]=d},usun:function(c){delete b[c]},pobierz:function(c){return b[c]},czyIstnieje:function(c){if(b[c]){return true}return false}}});try{document.execCommand("BackgroundImageCache",false,true)}catch(oB){}function fixPNG(b){if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var e,d,c,a;if(b.tagName==="IMG"){if(/\.png$/.test(b.src)){e=b.src;b.src="./i/e.gif"}}else{e=b.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(e){e=e[1];b.runtimeStyle.backgroundImage="none"}}d=/iesizing\-(\w+)/;a=d.exec(b.className);c=(a)?a[1]:"crop";if(e){b.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"',sizingMethod='"+c+"')"}}}var dodajOnload=cGR.prototype.dodajOnload,dodajWykonajNaKoncu=cGR.prototype.dodajWykonajNaKoncu,gr$=cGR.prototype.$,$=cGR.prototype.$;GR("dodajOnload",function(){GR("przetworzLinki")});dodajWykonajNaKoncu(function(){var a=GR("$$","chmurki");if(!a.length){return}setTimeout(function(){GR("o_chmurki_inicjalizuj",a)},10)});dodajWykonajNaKoncu(cGR.prototype.GoogleAnalytics);dodajWykonajNaKoncu(cGR.prototype.inicjalizujGemiusHeatMap);function HTTPRequest(){this.czySync=false;this.zdarzenia=["start","open","send","load","end"]}HTTPRequest.prototype={czyObsluguje:function(){return !!this.polaczenie()},filtr:function(e){var g,f=0,d=0,b=0,h="",a=["%u0104","%u0106","%u0118","%u0141","%u0143","%u015A","%u017B","%u0179","%u0105","%u0107","%u0119","%u0142","%u0144","%u015B","%u017C","%u017A"],c=["%A1","%C6","%CA","%A3","%D1","%A6","%AF","%AC","%B1","%E6","%EA","%B3","%F1","%B6","%BF","%BC"];e=escape(e);g=e.match(/%u[a-z0-9]{4}/gi);if(g){for(f=0,b=g.length;f<b;f+=1){h="";for(d=0;d<a.length;d+=1){if(a[d]===g[f]){h=c[d];break}}e=e.replace(g[f],h)}}return e},polaczenie:function(){var a=0,c=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];try{return new XMLHttpRequest()}catch(d){for(a=0;a<c.length;a+=1){try{return new ActiveXObject(c[a])}catch(b){}}}},formatujParametry:function(c){var b=[],a;for(a in c){if("function"!==typeof c[a]){b[b.length]=a+"="+(this.filtr?this.filtr(c[a]):c[a])}}return b.join("&")},get:function(a,c,b){return this.request("GET",a+(a.indexOf("?")+1?"&":"?")+this.formatujParametry(c),null,b,null)},post:function(a,c,b){return this.request("POST",a,c=this.formatujParametry(c),b,{Connection:"close","Content-Length":c.length,Method:"POST "+a+" HTTP/1.1","Content-Type":"application/x-www-form-urlencoded; charset=iso-8859-2"})},request:function(e,a,n,i,b){var j=this,c=this.polaczenie(),g=i instanceof Function,m,d;try{c.open(e,a,!this.czySync);this.czySync||(c.onreadystatechange=function(){m=j.zdarzenia[c.readyState];if(g&&m==="end"){i(c)}if(m in i){i[m](c)}});c.setRequestHeader("HTTP_USER_AGENT","XMLHttpRequest");try{for(d in b){if("function"!==typeof b[d]){c.setRequestHeader(d,b[d])}}c.overrideMimeType("text/html; charset=ISO-8859-2")}catch(h){}c.send(n);this.czySync&&(g?i(c):i.end&&i.end(c));return true}catch(l){return false}}};var oAjax=new HTTPRequest();var grSwf=function(){var a={type:"application/x-shockwave-flash"},e={quality:"high",wmode:"transparent",pluginspage:"http://www.macromedia.com/go/getflashplayer"},b="";function c(){var g=[],h,f;g.push("<object ");for(h in a){if("function"!==typeof a[h]){g.push(h+'="'+a[h]+'" ')}}g.push(">");for(f in e){if("function"!==typeof e[f]){g.push('<param name="'+f+'" value="'+e[f]+'" />')}}if(b){g.push("<p>"+b+"</p>")}g.push("</object>");return g.join("")}function d(f){for(var g in f){if("function"!==typeof f[g]){e[g]=f[g]}}}return{wstaw:function(h,f,j,k,i){i=$(i);f=f||0;j=j||0;k=k||0;if(!h&&"string"!==typeof h){return}a.data=e.movie=h;if(f){a.width=f}if(j){a.height=j}if(k){d(k)}var g=c();if(i){i.innerHTML=g}else{GR("wpisz",g)}},ustawAtrybut:function(g,f){a[g]=f},ustawParametr:function(g,f){e[g]=f},ustawTekstZastepczy:function(f){b=f}}}();