curvyCornersVerbose=false;function hookTooltips(a){if(!$defined(a)){a=$("body")}a.getElements("img[class=tooltiped]").each(function(b){new Tips(b,{maxOpacity:0.9,maxTitleChars:25,className:"tooltip"})});$$("#quick_add_icons div").each(function(b){new Tips(b,{maxOpacity:0.9,maxTitleChars:25,className:"tooltip"})})}function hookDelete(){if($$(".drop_tabs_item")){$$(".drop_tabs_item").each(function(a){a.addEvent("click",function(c){var b=confirm(translate("Czy na pewno chcesz usunąć dodaną treść?"));if(b){return true}else{return false}})})}}function getContainer(a,b){if(a.hasClass(b)||(a.getProperty("id")=="body")){return a}else{return getContainer(a.getParent(),b)}}function translate(a){if(typeof translations[a]=="undefined"){return a}return translations[a]}function showOverlay(){if($("overlay")){a=$("overlay")}else{var a=new Element("div",{id:"overlay"}).injectInside($("body"))}a.setStyle("height",$("body").getCoordinates().height+"px");a.setStyle("background-color","#000");a.setStyle("opacity","0.7");a.setStyle("filter","alpha(opacity: 70)");a.setStyle("display","block")}function hideOverlay(){if($("overlay")){$("overlay").dispose()}}function humanized(d,a,e){showOverlay();var c=new Element("div",{id:"humanized_box"}).injectInside($("body"));new Element("div",{id:"humanized_header",text:e}).injectInside(c);new Element("div",{id:"humanized_content"}).injectInside(c);$("humanized_content").set("html",d);if(a){new Element("div",{id:"humanized_footer"}).injectInside(c);setTimeout(function(){var g=new Fx.Tween($("humanized_box"));g.start("opacity","1","0");setTimeout(function(){$("humanized_box").dispose();if(!$("friends_overlay")){hideOverlay()}},500)},2000)}else{var f=new Element("div",{id:"humanized_false_footer"}).injectInside(c);var b=new Element("div",{id:"humanized_outer"}).injectInside(f);button=new Element("div",{text:"ok",events:{click:function(){var g=new Fx.Tween($("humanized_box"));g.start("opacity","1","0");setTimeout(function(){$("humanized_box").dispose();hideOverlay()},500);if($("loader_info")){$("loader_info").setStyle("display","none")}}}}).injectInside(b)}}window.addEvent("domready",function(){if($$("form.check")[0]){libLangInit()}});function formSendResult(b){if(b.status){try{if(!b.location){throw"Wrong location parameter"}window.location=b.location}catch(a){alert(a);humanized(b.message,false)}}else{if(b.redirect){try{if(!b.location){throw"Wrong location parameter"}humanized(b.message,true);setTimeout(function(){window.location=b.location},2000)}catch(a){alert(a);humanized(b.message,false)}}else{humanized(b.message,b.status)}}}function strpos(b,c,d){var a=(b+"").indexOf(c,(d?d:0));return a===-1?false:a}function stripslashes(a){while(strpos(a,"\\'")!==false){a=a.replace("\\'","&#39;")}return a}function humanizedConfirm(j,p,m,o){showOverlay();var n=new Element("div",{id:"humanized_box"}).injectInside($("body"));var q=new Element("div",{id:"humanized_header",text:m}).injectInside(n);new Element("br",{}).injectInside(q);new Element("div",{id:"humanized_content",text:j}).injectInside(n);if(p){new Element("div",{id:"humanized_footer"}).injectInside(n);setTimeout(function(){var a=new Fx.Tween($("humanized_box"));a.start("opacity","1","0");setTimeout(function(){$("humanized_box").dispose();hideOverlay()},500)},2000)}else{var l=new Element("div",{id:"humanized_false_footer"}).injectInside(n);var r=new Element("div",{id:"humanized_outer_cancel"}).injectInside(l);var k=new Element("div",{id:"humanized_outer"}).injectInside(l);cancel=new Element("div",{text:"cancel",events:{click:function(){var a=new Fx.Tween($("humanized_box"));a.start("opacity","1","0");$("humanized_box").dispose();hideOverlay();if($("loader_info")){$("loader_info").setStyle("display","none")}}}}).injectInside(r);button=new Element("div",{text:"ok",events:{click:function(){var a=new Fx.Tween($("humanized_box"));a.start("opacity","1","0");$("humanized_box").dispose();hideOverlay();if($("loader_info")){$("loader_info").setStyle("display","none")}sendForm(o)}}}).injectInside(k)}}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")};