function sack(_1){
this.xmlhttp=null;
this.resetData=function(){
this.method="POST";
this.queryStringSeparator="?";
this.argumentSeparator="&";
this.URLString="";
this.encodeURIString=true;
this.execute=false;
this.element=null;
this.elementObj=null;
this.requestFile=_1;
this.vars=new Object();
this.responseStatus=new Array(2);
};
this.resetFunctions=function(){
this.onLoading=function(){
};
this.onLoaded=function(){
};
this.onInteractive=function(){
};
this.onCompletion=function(){
};
this.onError=function(){
};
this.onFail=function(){
};
};
this.reset=function(){
this.resetFunctions();
this.resetData();
};
this.createAJAX=function(){
try{
this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e1){
try{
this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e2){
this.xmlhttp=null;
}
}
if(!this.xmlhttp){
if(typeof XMLHttpRequest!="undefined"){
this.xmlhttp=new XMLHttpRequest();
}else{
this.failed=true;
}
}
};
this.setVar=function(_2,_3){
this.vars[_2]=Array(_3,false);
};
this.encVar=function(_4,_5,_6){
if(true==_6){
return Array(encodeURIComponent(_4),encodeURIComponent(_5));
}else{
this.vars[encodeURIComponent(_4)]=Array(encodeURIComponent(_5),true);
}
};
this.processURLString=function(_7,_8){
encoded=encodeURIComponent(this.argumentSeparator);
regexp=new RegExp(this.argumentSeparator+"|"+encoded);
varArray=_7.split(regexp);
for(i=0;i<varArray.length;i++){
urlVars=varArray[i].split("=");
if(true==_8){
this.encVar(urlVars[0],urlVars[1]);
}else{
this.setVar(urlVars[0],urlVars[1]);
}
}
};
this.createURLString=function(_9){
if(this.encodeURIString&&this.URLString.length){
this.processURLString(this.URLString,true);
}
if(_9){
if(this.URLString.length){
this.URLString+=this.argumentSeparator+_9;
}else{
this.URLString=_9;
}
}
this.setVar("rndval",new Date().getTime());
urlstringtemp=new Array();
for(key in this.vars){
if(false==this.vars[key][1]&&true==this.encodeURIString){
encoded=this.encVar(key,this.vars[key][0],true);
delete this.vars[key];
this.vars[encoded[0]]=Array(encoded[1],true);
key=encoded[0];
}
urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0];
}
if(_9){
this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator);
}else{
this.URLString+=urlstringtemp.join(this.argumentSeparator);
}
};
this.runResponse=function(){
eval(this.response);
};
this.runAJAX=function(_a){
if(this.failed){
this.onFail();
}else{
this.createURLString(_a);
if(this.element){
this.elementObj=document.getElementById(this.element);
}
if(this.xmlhttp){
var _b=this;
if(this.method=="GET"){
totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;
this.xmlhttp.open(this.method,totalurlstring,true);
}else{
this.xmlhttp.open(this.method,this.requestFile,true);
try{
this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}
catch(e){
}
}
this.xmlhttp.onreadystatechange=function(){
switch(_b.xmlhttp.readyState){
case 1:
_b.onLoading();
break;
case 2:
_b.onLoaded();
break;
case 3:
_b.onInteractive();
break;
case 4:
_b.response=_b.xmlhttp.responseText;
_b.responseXML=_b.xmlhttp.responseXML;
_b.responseStatus[0]=_b.xmlhttp.status;
_b.responseStatus[1]=_b.xmlhttp.statusText;
if(_b.execute){
_b.runResponse();
}
if(_b.elementObj){
elemNodeName=_b.elementObj.nodeName;
elemNodeName.toLowerCase();
if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){
_b.elementObj.value=_b.response;
}else{
_b.elementObj.innerHTML=_b.response;
}
}
if(_b.responseStatus[0]=="200"){
_b.onCompletion();
}else{
_b.onError();
}
_b.URLString="";
break;
}
};
this.xmlhttp.send(this.URLString);
}
}
};
this.reset();
this.createAJAX();
}

var polls_ajax_url="/wp-content/plugins/polls/polls.php";
var polls_text_wait="Twój ostatni głos jest zapisywany. Proszę czekać ...";
var polls_text_valid="Wybierz odpowiedź.";
var polls_text_multiple="Maksymalna liczba zaznaczonych odpowiedzi:";
var polls=new sack(polls_ajax_url);
var poll_id=0;
var poll_answer_id="";
var poll_fadein_opacity=0;
var poll_fadeout_opacity=100;
var poll_show_loading=1;
var poll_show_fading=1;
var is_ie=(document.all&&document.getElementById);
var is_moz=(!document.all&&document.getElementById);
var is_opera=(navigator.userAgent.indexOf("Opera")>-1);
var is_being_voted=false;
function poll_vote(_1){
if(!is_being_voted){
is_being_voted=true;
poll_id=_1;
poll_form=document.getElementById("polls_form_"+poll_id);
poll_answer=eval("poll_form.poll_"+poll_id);
poll_answer_id="";
if(document.getElementById("poll_multiple_ans_"+poll_id)){
poll_multiple_ans=parseInt(document.getElementById("poll_multiple_ans_"+poll_id).value);
}else{
poll_multiple_ans=0;
}
poll_multiple_ans_count=0;
if(poll_answer.length!=null){
for(i=0;i<poll_answer.length;i++){
if(poll_answer[i].checked){
if(poll_multiple_ans>0){
poll_answer_id=poll_answer[i].value+","+poll_answer_id;
poll_multiple_ans_count++;
}else{
poll_answer_id=parseInt(poll_answer[i].value);
}
}
}
}else{
poll_answer_id=poll_answer.value;
}
if(poll_multiple_ans>0){
if(poll_multiple_ans_count>0&&poll_multiple_ans_count<=poll_multiple_ans){
poll_answer_id=poll_answer_id.substring(0,(poll_answer_id.length-1));
poll_loading_text();
poll_process();
}else{
if(poll_multiple_ans_count==0){
is_being_voted=false;
alert(polls_text_valid);
}else{
is_being_voted=false;
alert(polls_text_multiple+" "+poll_multiple_ans+".");
}
}
}else{
if(poll_answer_id>0){
poll_loading_text();
poll_process();
}else{
is_being_voted=false;
alert(polls_text_valid);
}
}
}else{
alert(polls_text_wait);
}
}
function poll_result(A){
if(!is_being_voted){
is_being_voted=true;
poll_id=A;
poll_loading_text();
poll_process_result();
}else{
alert(polls_text_wait);
}
}
function poll_booth(A){
if(!is_being_voted){
is_being_voted=true;
poll_id=A;
poll_loading_text();
poll_process_booth();
}else{
alert(polls_text_wait);
}
}
function poll_fadein_text(){
if(poll_fadein_opacity==90){
poll_unloading_text();
}
if(poll_fadein_opacity<100){
poll_fadein_opacity+=10;
if(is_opera){
poll_fadein_opacity=100;
poll_unloading_text();
}else{
if(is_ie){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").filters.alpha.opacity=poll_fadein_opacity;
}else{
poll_fadein_opacity=100;
poll_unloading_text();
}
}else{
if(is_moz){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").style.MozOpacity=(poll_fadein_opacity/100);
}else{
poll_fadein_opacity=100;
poll_unloading_text();
}
}
}
}
setTimeout("poll_fadein_text()",100);
}else{
poll_fadein_opacity=100;
is_being_voted=false;
}
}
function poll_loading_text(){
if(poll_show_loading){
document.getElementById("polls-"+poll_id+"-loading").style.display="block";
}
}
function poll_unloading_text(){
if(poll_show_loading){
document.getElementById("polls-"+poll_id+"-loading").style.display="none";
}
}
function poll_process(){
if(poll_fadeout_opacity>0){
poll_fadeout_opacity-=10;
if(is_opera){
poll_fadeout_opacity=0;
}else{
if(is_ie){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").filters.alpha.opacity=poll_fadeout_opacity;
}else{
poll_fadeout_opacity=0;
}
}else{
if(is_moz){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").style.MozOpacity=(poll_fadeout_opacity/100);
}else{
poll_fadeout_opacity=0;
}
}
}
}
setTimeout("poll_process()",100);
}else{
poll_fadeout_opacity=0;
polls.reset();
polls.setVar("vote",true);
polls.setVar("poll_id",poll_id);
polls.setVar("poll_"+poll_id,poll_answer_id);
polls.method="POST";
polls.element="polls-"+poll_id+"-ans";
polls.onCompletion=poll_fadein_text;
polls.runAJAX();
poll_fadein_opacity=0;
poll_fadeout_opacity=100;
}
}
function poll_process_result(){
if(poll_fadeout_opacity>0){
poll_fadeout_opacity-=10;
if(is_opera){
poll_fadeout_opacity=0;
}else{
if(is_ie){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").filters.alpha.opacity=poll_fadeout_opacity;
}else{
poll_fadeout_opacity=0;
}
}else{
if(is_moz){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").style.MozOpacity=(poll_fadeout_opacity/100);
}else{
poll_fadeout_opacity=0;
}
}
}
}
setTimeout("poll_process_result()",100);
}else{
poll_fadeout_opacity=0;
polls.reset();
polls.setVar("pollresult",poll_id);
polls.method="GET";
polls.element="polls-"+poll_id+"-ans";
polls.onCompletion=poll_fadein_text;
polls.runAJAX();
poll_fadein_opacity=0;
poll_fadeout_opacity=100;
}
}
function poll_process_booth(){
if(poll_fadeout_opacity>0){
poll_fadeout_opacity-=10;
if(is_opera){
poll_fadeout_opacity=0;
}else{
if(is_ie){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").filters.alpha.opacity=poll_fadeout_opacity;
}else{
poll_fadeout_opacity=0;
}
}else{
if(is_moz){
if(poll_show_fading){
document.getElementById("polls-"+poll_id+"-ans").style.MozOpacity=(poll_fadeout_opacity/100);
}else{
poll_fadeout_opacity=0;
}
}
}
}
setTimeout("poll_process_booth()",100);
}else{
poll_fadeout_opacity=0;
polls.reset();
polls.setVar("pollbooth",poll_id);
polls.method="GET";
polls.element="polls-"+poll_id+"-ans";
polls.onCompletion=poll_fadein_text;
polls.runAJAX();
poll_fadein_opacity=0;
poll_fadeout_opacity=100;
}
}

if(typeof deconcept=="undefined"){
var deconcept=new Object();
}
if(typeof deconcept.util=="undefined"){
deconcept.util=new Object();
}
if(typeof deconcept.SWFObjectUtil=="undefined"){
deconcept.SWFObjectUtil=new Object();
}
deconcept.SWFObject=function(K,B,L,D,H,I,F,E,C,J){
if(!document.getElementById){
return;
}
this.DETECT_KEY=J?J:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(K){
this.setAttribute("swf",K);
}
if(B){
this.setAttribute("id",B);
}
if(L){
this.setAttribute("width",L);
}
if(D){
this.setAttribute("height",D);
}
if(H){
this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")));
}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7){
deconcept.SWFObject.doPrepUnload=true;
}
if(I){
this.addParam("bgcolor",I);
}
var A=F?F:"high";
this.addParam("quality",A);
this.setAttribute("useExpressInstall",false);
this.setAttribute("doExpressInstall",false);
var G=(E)?E:window.location;
this.setAttribute("xiRedirectUrl",G);
this.setAttribute("redirectUrl","");
if(C){
this.setAttribute("redirectUrl",C);
}
};
deconcept.SWFObject.prototype={useExpressInstall:function(A){
this.xiSWFPath=!A?"expressinstall.swf":A;
this.setAttribute("useExpressInstall",true);
},setAttribute:function(A,B){
this.attributes[A]=B;
},getAttribute:function(A){
return this.attributes[A];
},addParam:function(B,A){
this.params[B]=A;
},getParams:function(){
return this.params;
},addVariable:function(B,A){
this.variables[B]=A;
},getVariable:function(A){
return this.variables[A];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var C=new Array();
var B;
var A=this.getVariables();
for(B in A){
C[C.length]=B+"="+A[B];
}
return C;
},getSWFHTML:function(){
var B="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
this.setAttribute("swf",this.xiSWFPath);
}
B="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";
B+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var F=this.getParams();
for(var E in F){
B+=[E]+"=\""+F[E]+"\" ";
}
var D=this.getVariablePairs().join("&");
if(D.length>0){
B+="flashvars=\""+D+"\"";
}
B+="/>";
}else{
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","ActiveX");
this.setAttribute("swf",this.xiSWFPath);
}
B="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";
B+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var C=this.getParams();
for(var E in C){
B+="<param name=\""+E+"\" value=\""+C[E]+"\" />";
}
var A=this.getVariablePairs().join("&");
if(A.length>0){
B+="<param name=\"flashvars\" value=\""+A+"\" />";
}
B+="</object>";
}
return B;
},write:function(B){
if(this.getAttribute("useExpressInstall")){
var A=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);
}
}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var C=(typeof B=="string")?document.getElementById(B):B;
C.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){
document.location.replace(this.getAttribute("redirectUrl"));
}
}
return false;
}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var E=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var A=navigator.plugins["Shockwave Flash"];
if(A&&A.description){
E=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));
}
}else{
if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
var B=1;
var C=3;
while(B){
try{
C++;
B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+C);
E=new deconcept.PlayerVersion([C,0,0]);
}
catch(D){
B=null;
}
}
}else{
try{
var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(D){
try{
var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
E=new deconcept.PlayerVersion([6,0,21]);
B.AllowScriptAccess="always";
}
catch(D){
if(E.major==6){
return E;
}
}
try{
B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(D){
}
}
if(B!=null){
E=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","));
}
}
}
return E;
};
deconcept.PlayerVersion=function(A){
this.major=A[0]!=null?parseInt(A[0]):0;
this.minor=A[1]!=null?parseInt(A[1]):0;
this.rev=A[2]!=null?parseInt(A[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(A){
if(this.major<A.major){
return false;
}
if(this.major>A.major){
return true;
}
if(this.minor<A.minor){
return false;
}
if(this.minor>A.minor){
return true;
}
if(this.rev<A.rev){
return false;
}
return true;
};
deconcept.util={getRequestParameter:function(C){
var D=document.location.search||document.location.hash;
if(C==null){
return D;
}
if(D){
var B=D.substring(1).split("&");
for(var A=0;A<B.length;A++){
if(B[A].substring(0,B[A].indexOf("="))==C){
return B[A].substring((B[A].indexOf("=")+1));
}
}
}
return "";
}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
var B=document.getElementsByTagName("OBJECT");
for(var C=B.length-1;C>=0;C--){
B[C].style.display="none";
for(var A in B[C]){
if(typeof B[C][A]=="function"){
B[C][A]=function(){
};
}
}
}
};
if(deconcept.SWFObject.doPrepUnload){
if(!deconcept.unloadSet){
deconcept.SWFObjectUtil.prepUnload=function(){
__flash_unloadHandler=function(){
};
__flash_savedUnloadHandler=function(){
};
window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);
};
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);
deconcept.unloadSet=true;
}
}
if(!document.getElementById&&document.all){
document.getElementById=function(A){
return document.all[A];
};
}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;

function ajaxEffect(A){
$(A).css({visibility:"hidden"}).fadeIn(1000).css({visibility:"visible"});
}
$(document).ready(function(){
$(".post img").each(function(){
$(this).attr("class",$(this).attr("align"));
});
ajaxURL="/wp-content/plugins/jquery-ajax-comments/jquery-ajax.php";
$("form#commentform").submit(function(){
if($.find("#commentlist")==""){
$(this).before("<div id=\"comments_area\"><ul id=\"commentlist\"></ul></div>");
}
$("h2#comments").fadeOut(1000,function(){
$(this).html("Wszystkie komentarze");
ajaxEffect(this);
});
$("#commentlist").append("<li id=\"loading\"><p>Proszę czekać... trwa publikowanie komentarza</p></li>");
ajaxEffect("#loading");
$.ajax({type:"POST",url:ajaxURL,data:$("#commentform input, #commentform textarea").serialize(),dataType:"html",error:function(A){
if($("#ajaxerror")){
$("#ajaxerror").remove();
}
$("#loading").fadeOut(1000,function(){
$("#loading").remove();
if(A.responseText.search(/<title>WordPress &rsaquo;<\/title>/)!=-1){
var B=A.responseText.match(/<p>(.*)<\/p>/);
B="<li id=\"ajaxerror\"><p>"+B[1]+"</p></li>";
}else{
var B=A.responseText;
}
$("#commentlist").append(B);
ajaxEffect("#ajaxerror");
});
},success:function(A){
if($("#ajaxerror")){
$("#ajaxerror").remove();
}
$("#loading").fadeOut(1000,function(){
$("#loading").remove();
$("#commentlist").append(A);
$("#commentform textarea").val("");
ajaxEffect("#newcomment");
});
}});
return false;
});
});


