/* WPJSlib (c) 2007 - 2008 Wirtualna Polska   www.wp.pl   Lukasz Wegrzynski-Scibiorek */
/* Do not copy or modify any part of the following code without permition       v0.20 */

var d=window.document;if(typeof(WP)=='undefined'){var $=function(id){if(!id)id=window.document;else if(typeof(id)!='object'){if(d.getElementById(id))id=d.getElementById(id);}
return WP.extend(id,{hide:function(){try{id.style.display='none';}catch(e){}},show:function(){try{id.style.display='block';}catch(e){}},addClass:function(n){if(!this.hasClass(n))id.className+=' '+n;},deleteClass:function(n){if(this.hasClass(n)){var w=new RegExp("(^"+n+"$|"+n+"\\s|\\s"+n+")");id.className=id.className.replace(w,'');}},hasClass:function(n){var w=new RegExp("(^"+n+"$|\\s"+n+"\\s|^"+n+"\\s|\\s"+n+"$)");return w.test(id.className);}});}
var WP={ver:'0.20',isOpera:navigator.userAgent.indexOf("Opera")>-1,opera:navigator.userAgent.indexOf("Opera")>-1,isIE:!!(d.all&&!navigator.userAgent.indexOf("Opera")>-1),ie:!!(d.all&&!navigator.userAgent.indexOf("Opera")>-1),isGecko:navigator.product=='Gecko',gecko:navigator.product=='Gecko',isSafari:navigator.vendor=='Apple',isWebkit:/Apple|KDE/i.test(navigator.vendor),browser:this.isIE?'IE':this.isGecko?'Gecko':this.isOpera?'Opera':this.isSafari?'Safari':this.isWebkit?'Webkit':'other',isWin:navigator.platform.indexOf('Win')>-1,isLinux:navigator.platform.indexOf('Linux')>-1,isMac:navigator.platform.indexOf('Mac')>-1,os:this.isWin?'Win':this.isMac?'Mac':this.isLinux?'Linux':'other',TS:new Date(),SSL:d.location.href.substr(4,1)=='s'?'s':'',test:function(){WP.ajax.get({url:'wpjslibtm.html',onTimeout:function(){alert('WPJSLIBtm timeout');},onSuccess:function(x){eval(x.text);}});},extend:function(t,s){for(var w in s)t[w]=s[w];return t;},'event':{_domReady:false,_ondomloadList:[],_ondomloadSet:function(f){this._ondomloadList.push(f);if(this._ondomloadList.length>1)return;if(WP.ie){document.write("<sc"+"ript id=__ie_onload defer src=javascript:void(0)><\/sc"+"ript>");var script=document.getElementById("__ie_onload");script.onreadystatechange=function(){if(this.readyState=="complete"){WP.event._ondomloadStart();}};}else if(WP.webkit){var t=setInterval(function(){if(/loaded|complete/.test(d.readyState)){WP.event._ondomloadStart();}},10);}else{WP.event.set('onload',WP.event._ondomloadStart());}},_ondomloadStart:function(){if(this._domReady)return;this._domReady=true;for(var i in this._ondomloadList)this._ondomloadList[i]();},set:function(o,t,f){if(arguments.length==3){if(typeof(o)=='string'&&o.length==0)return null;o=typeof(o)!='object'?$(o):o;}
else if(arguments.length==2){f=t;t=o;o=window;}else return false;if(typeof(f)!='function')return false;if(t=='ondomload'){if((WP.gecko||WP.opera)&&!WP.webkit)document.addEventListener('DOMContentLoaded',f,false);else this._ondomloadSet(f);}else if(o.attachEvent)o.attachEvent(t,f);else if(o.addEventListener)o.addEventListener(t.substr(2),f,false);},unset:function(o,t,fn){if(arguments.length==3){o=typeof(o)=='object'?o:$(o);}
else if(arguments.length==2){f=t;t=o;o=window;}else return false;o=typeof(o)=='object'?o:$(o);if(o.detachEvent)o.detachEvent(t,fn);else if(o.addEventListener)o.addEventListener(t.substr(2),false);},getNode:function(t){var n;t=typeof(t)!='undefined'?t:window.event;if(t.target)n=t.target;else if(t.srcElement)n=t.srcElement;if(n.nodeType==3)n=targ.parentNode;return n;}},getEventNode:function(t){var n;if(!t)var t=window.event;if(t.target)n=t.target;else if(t.srcElement)n=t.srcElement;if(n.nodeType==3)n=targ.parentNode;return n;},getEventParentId:function(t){},cookie:{set:function(name,value,expires,path,domain){var cStr=name+"="+escape(value)+
((expires)?";expires="+expires.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"");document.cookie=cStr;},get:function(name,escaped){var dc=document.cookie;var start=dc.indexOf(name+"=");var len=start+name.length+1;if(((!start)&&(name!=dc.substring(0,name.length)))||(start==-1))return null;var end=dc.indexOf(";",len);if(end==-1)end=dc.length;if(escaped)return dc.substring(len,end);else return unescape(dc.substring(len,end));},erase:function(name){var d=new Date();d.setYear(0);this.set(name,'',d);},noexpire:function(){return this.expire(60*24*365*2);},expire:function(m){var t=new Date();t.setTime(t.getTime());var cE=new Date(t.getTime()+m*1000*60);return cE;}},mcookie:{name:".WP",set:function(name,value,expire){expire=(!expire?WP.cookie.noexpire():expire);var c=WP.cookie.get(this.name);if(c){var r=new RegExp("(^|&)"+name+"=[^&]*&?");c=c.replace(r,"$1");if(c.length!=0)c+="&";}else
c="";c+=name+'='+value;WP.cookie.set(this.name,c,expire);},get:function(name){var c=WP.cookie.get(this.name);var r=new RegExp("\\b"+name+"=([^;&]*)");cV=r.exec(c);if(cV!=null&&cV[1]!=null)
return unescape(cV[1]);else return null;},erase:function(name){var c=WP.cookie.get(this.name);if(c){var r=new RegExp("(^|&)"+name+"=[^&]*&?");c=c.replace(r,"$1");if(c.length!=0)WP.cookie.set(this.name,c);else WP.cookie.erase(this.name);}},destroy:function(){WP.cookie.erase(this.name);}},flash:{version:-1,versionMinor:-1,versionRelease:-1,counter:0,getVersion:function(){if(this.version<0){if(WP.ie)try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");t=t.GetVariable('$version').split(' ');t=t[1].split(',');this.version=t[0];this.versionMinor=t[1];this.versionRelease=t[2];}catch(e){this.version=0;}
else try{var t=navigator.plugins['Shockwave Flash'].description;t=t.split(' ');if(t[3])b=t[3].split('r');else b=t[4].split('r');t=t[2].split('.');this.version=t[0];this.versionMinor=t[1];this.versionRelease=b[1];}catch(e){this.version=0;}}
return this.version;},getFullVersion:function(){if(this.version<0)this.getVersion();return this.version+'.'+this.versionMinor+'.'+this.versionRelease;},embed:function(file,width,height,flashvars,o,id,zid){o=o?o:{};o.quality=o.quality?o.quality:'high';o.wmode=o.wmode?o.wmode:'opaque';o.allowscriptaccess=o.allowscriptaccess?o.allowscriptaccess:'sameDomain';this.counter++;id=id?id:'flashNr'+this.counter;if(!zid){var zid='flashEmbed'+this.counter;document.write('<span id="'+zid+'" class="flashEmbed"></span>');}
if(typeof(HTMLElement)!='undefined'){var obj=document.createElement('object');obj.setAttribute('data',file);obj.setAttribute('type','application/x-shockwave-flash');obj.setAttribute('width',width);obj.setAttribute('height',height);obj.setAttribute('id',id);var par=document.createElement('param');par.setAttribute('name','pluginspage');par.setAttribute('value','http'+WP.SSL+'://www.macromedia.com/go/getflashplayer');obj.appendChild(par);par=document.createElement('param');par.setAttribute('name','FlashVars');par.setAttribute('value',flashvars);obj.appendChild(par);for(var w in o){par=document.createElement('param');par.setAttribute('name',w);par.setAttribute('value',o[w]);obj.appendChild(par);}
$(zid).appendChild(obj);}else{h='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http'+WP.SSL+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+id+'">'+'<param name="movie" value="'+file+'" /><param name="flashvars" value="'+flashvars+'" />';for(var w in o){h+='<param name="'+w+'" value="'+o[w]+'" />';}
h+='</object>';$(zid).insertAdjacentHTML('beforeEnd',h);}}},ajax:{_ao:function(){if(window.XMLHttpRequest)return new XMLHttpRequest();else if(window.ActiveXObject)try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(e){return null;}}},_de:function(d){if(typeof(d.request['onreadystatechange'])!=null)delete d.request['onreadystatechange'];if(typeof(d.request)!='null')d.request=null;},_df:function(){var d={url:'',timeout:1E4,encoding:'utf-8',cache:false,params:[],form:null,onSuccess:null,onError:null,onTimeout:null,text:null,xml:null,done:false,abort:false,doTimeout:function(){if(d==null||d.request==null||d.done)return false;d.abort=true;d.request.abort();WP.ajax._de(d);if(typeof(d.onTimeout)=='function')d.onTimeout(d);}};return d;},serialize:function(n){if(!n)return'';var S='';if(typeof(n)=='object'){for(var i in n)S+='&'+encodeURIComponent(i)+'='+encodeURIComponent(n[i]);}else if($(n).nodeName&&$(n).nodeName.toLowerCase()=='form'){var e=$(n).elements;for(var i=0;i<e.length;i++)switch(e[i].type){case'checkbox':case'radio':if(e[i].checked)S+=this.serialize(this._pArray(e[i].name,e[i].value));break;case'select-one':S+=this.serialize(this._pArray(e[i].name,e[i].options[e[i].selectedIndex].value));break;case'select-multiple':for(var j=0;j<e[i].options.length;j++)
if(e[i].options[j].selected)S+=this.serialize(this._pArray(e[i].name,e[i].options[j].value));break;default:S+=this.serialize(this._pArray(e[i].name,e[i].value));}}
return S;},_pArray:function(p1,p2){if(typeof(p1)=='undefined')return null;var a=new Array();a[p1]=p2;return a;},doRequest:function(m,o){if(typeof(o)!='object'||o==null)return false;var r=new this._df();m=m.toLowerCase();WP.extend(r,o);if(r.url.length<3&&r.params.length<1&&!r.form)return false;r.request=this._ao();r.request.onreadystatechange=function(){if(r==null||r.request==null)return false;if(r.request.readyState==4&&!r.abort){r.done=true;r.text=r.request.responseText;r.xml=r.request.responseXML;if(r.request.status==200&&typeof(r.onSuccess)=='function'){r.onSuccess(r);}else if(typeof(r.onError)=='function')
r.onError(r);WP.ajax._de(r);}};var pStr=new String(this.serialize(r.form)+this.serialize(r.params));if(m=='get'){r.url+=pStr;if(r.url.indexOf('?')<0)r.url=r.url.replace('&','?');r.request.open(m,r.url,true);r.request.setRequestHeader("If-Modified-Since","Sat, 11 Jan 1977 00:00:00 GMT");r.request.send('');}else{pStr=pStr.replace('&','');r.request.open(m,r.url,true);r.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"+(r.encoding?'; charset='+r.encoding:''));r.request.setRequestHeader("If-Modified-Since","Sat, 11 Jan 1977 00:00:00 GMT");r.request.send(pStr);}
if(r.timeout)setTimeout(r.doTimeout,r.timeout);},get:function(o){this.doRequest('get',o);},post:function(o){this.doRequest('post',o);}},tab:{activate:function(id,t){if(!$(id)){alert('Podaj ID grupy zakladek!');return false;}
var mP=function(e){var r=new RegExp("(.*)DT([0-9]{1,3})");var c=r.exec(WP.getEventNode(e).id);return WP.tab.press(c[1],c[2]);};var tag=$(id).getElementsByTagName('*');WP.tab.ile[id]=0;for(i=0;i<tag.length;i++){if(tag[i].id.indexOf(id+'DT')==0){$(tag[i].id).onclick=mP;WP.tab.ile[id]+=1;}};if(t==null)WP.tab.press(id,1);else if(t<=WP.tab.ile[id])WP.tab.press(id,t);},press:function(id,t){for(var i=1;i<=WP.tab.ile[id];i++){if(i==t){$(id+'DT'+i).addClass('on');$(id+'DD'+i).show();WP.tab.active[id]=i;}else{$(id+'DT'+i).deleteClass('on');$(id+'DD'+i).hide();}}
return false;},next:function(id){return WP.tab.press(id,(WP.tab.ile[id]>WP.tab.active[id]?WP.tab.active[id]+1:1));},previous:function(id){return WP.tab.press(id,(WP.tab.active[id]>1?WP.tab.active[id]-1:WP.tab.ile[id]));},rotate:function(id,t,o){},ile:{},active:{},ts:{}},stat:{gemius:function(id,td){this._gemiusId=id;window.gemiusImg=new Image();if(td){this._gemiusTimeId=td;this._gemiusTimer(1);}else{window.gemiusImg.src=WP.stat.gemiusHost()+'/rexdot.gif?l=11&id='+id+this.gemiusParams();WP.event.set('onload',WP.stat.gemiusScr);}},_gemiusId:'',_gemiusTimeId:'',gemiusHost:function(){return'http'+WP.SSL+'://wp.hit.gemius.pl/_'+(new Date()).getTime();},gemiusParams:function(){var d=document;var s=screen;var h=new String(d.location.href);var r=new String(d.referrer?d.referrer:'');if(typeof(Error)=='function')eval("try{if (typeof(top.document.referrer)=='string')r=top.document.referrer;}catch(e){}");var url='&tz='+(new Date()).getTimezoneOffset()+'&href='+escape(h.substring(0,299))+'&ref='+escape(r.substring(0,299));url+=(s.width?'&screen='+s.width+'x'+s.height:'')+(s.colorDepth?'&col='+s.colorDepth:'');return url;},gemiusScr:function(){if(window.gemiusImg.width&&window.gemiusImg.width>1&&typeof(Error)=='function')
eval("var d=document;try{xj=d.createElement('script');xj.src=WP.stat.gemiusHost()+'/pp.js?id='+WP.stat._gemiusId;xj.type='text/javascript';d.body.appendChild(xj);} catch(e){}");},_gemiusTimer:function(n){window.gemiusImg.src=this.gemiusHost()+'/redot.gif?'+(n?'id='+this._gemiusId+"/id="+this._gemiusTimeId+this.gemiusParams():"id="+this._gemiusTimeId);setTimeout('WP.stat._gemiusTimer()',60*1000);},dot:function(sn,fb,tp){if(!!this._SN||!sn)return false;this._SN=sn;this._FB=fb;this._ID=Math.round(Math.random()*1E10);this._dotStd();if(!tp)return;if(/time/.test(tp)){WP.event.set('onunload',WP.stat._dotTimeEnd);setTimeout('WP.stat._dotTime()',this.TIMER*1000);}
if(/click/.test(tp)){WP.event.set(window.document,'onclick',WP.stat._setClickDot);WP.event.set(window,'onunload',WP.stat._sendClickDot);}},eventDot:function(n){if(!WP.stat._SN||!n)return false;var D=new Date();window.WP_DOTB=new Image(1,1),PG=new String(document.location);WP_DOTB.src='http'+WP.SSL+'://dot.wp.pl/r'+Math.round(Math.random()*1E10)+'/clk.gif?xd='+this._SN+'&yd='+escape(n)+'&pg='+escape(PG.substring(0,250))+'&dt='+(D-WP.TS);},TIMER:600,_SN:null,_FB:null,_ID:null,_DD:null,_DL:null,_dotStd:function(){this._sendDot('top');WP.event.set('onload',WP.stat._dotOnLoad);},_dotOnLoad:function(){var D=new Date();WP.stat._DL=D-WP.TS;WP.stat._sendDot('bottom');},_dotDLoad:function(){WP.stat._DD=new Date();},_dotTime:function(){this._sendDot('time');setTimeout('WP.stat._dotTime()',this.TIMER*1000);},_dotTimeEnd:function(){WP.stat._sendDot('timeend');},_sendDot:function(typ){if(!WP.stat._ID&&!typ)return false;var H=typeof(ENTRY_HIT)!='undefined'?ENTRY_HIT:'';window.WP_DOTB=new Image(1,1),PG=new String(document.location),RF=new String(document.referrer);var DT='';if(typ=='bottom'){DT='&dt='+WP.stat._DL;}
WP_DOTB.src='http'+WP.SSL+'://dot.wp.pl/r'+Math.round(Math.random()*1E10)+'/dot.gif?SN='+this._SN+'&Pos='+typ+'&pg='+escape(PG.substring(0,250))+'&rf='+escape(RF.substring(0,250))+'&vid='+this._ID+DT+'&fba='+(this._FB?this._FB:'0')+H;},_CU:null,_sendClickDot:function(){if(WP.stat._CU){var dot=new Image(1,1);dot.src=WP.stat._CU;}},_setClickDot:function(e){var b=WP.event.getNode(e);var t=b;while(t&&(t.tagName!='A'||!t.href)){t=t.parentNode;}
var p=b;while(p&&(p.tagName!='DIV'||!p.id)){p=p.parentNode;}; if(t){var CD=new Date();var DL=new String(document.location);var SP=DL.substring(0,250);var TP=t.href.substring(0,250)
var CI=p?p.id:'';WP.stat._CU='http'+WP.SSL+'://dot.wp.pl/r'+Math.round(Math.random()*1E10)+"/clk.gif?xd="+WP.stat._SN+"&yd="+CI+"&pg="+escape(SP)+"&tg="+escape(TP)+"&dt="+(CD-WP.TS);}}},'mouse':{trace:function(){},x:0,y:0},isArray:function(o){if(!o||o.constructor.toString().indexOf("Array")==-1)
return false;else return true;},cloud:{},'window':{width:function(){var w;if(window.innerWidth){w=window.innerWidth;}else if(d.documentElement&&d.documentElement.clientWidth){w=d.documentElement.clientWidth;}else if(d.body){w=d.body.clientWidth;}
return w;},height:function(){var h;if(window.innerHeight){h=window.innerHeight;}else if(d.documentElement&&d.documentElement.clientHeight){h=d.documentElement.clientHeight;}else if(d.body){h=d.body.clientHeight;}
return h;}}};WP.extend(String.prototype,{strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');}});WP.parseJSON=function(txt,filter){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var j;function walk(k,v){var i;if(v&&typeof v==='object'){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){v[i]=walk(i,v[i]);}}}
return filter(k,v);};if(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(txt.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,''))){try{j=eval('('+txt+')');}catch(e){throw new SyntaxError('syntax error in parseJSON');}
return typeof filter==='function'?walk('',j):j;} throw new SyntaxError('error in parseJSON');};WP.toJSON=function(){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/[\x00-\x1f\\"]/g,function(a){var c=m[a];if(c){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';} return'"'+s+'"';};if(self!=top&&!isOpera)top.location.href=self.location.href;if(typeof(WP.isGecko)!='undefined')window.onunload=function(){return true;}}