var is_opera=navigator.userAgent.indexOf("Opera")>-1;var is_safari=navigator.userAgent.indexOf("AppleWebKit/")>-1;var is_chrome=navigator.userAgent.indexOf("Chrome")>-1;var is_firefox=navigator.userAgent.indexOf("Firefox")>-1;var is_mac=navigator.platform.toLowerCase().indexOf("mac")>-1;var is_linux=navigator.platform.toLowerCase().indexOf("linux")>-1;var ie6=false;var ie7=false;var ie8=false;var practices_handler={container:null,items:[],last:null,setup:function(){var a=this;this.container=$("practices-container");if(!this.container){return}$(this.container).addClassName("loaded");this.items=$(this.container).select(".practice");this.items.each(function(c){var d=$(c).select("h2").first();var b=document.createElement("a");b.setAttribute("href","#");b.appendChild(d.firstChild);Event.observe(b,"mouseover",a.mouseoverListener.bind(a));Event.observe(b,"mouseout",a.mouseoutListener.bind(a));$(d).appendChild(b)})},mouseoutListener:function(c){var a=Event.findElement(c,"a");var b=$(a).up(".practice");$(b).removeClassName("active")},mouseoverListener:function(b){var a=Event.findElement(b,"a");this.toggle(a)},toggle:function(a){var b=$(a).up(".practice");$(b).addClassName("active");this.last=b}};var cvs_handler={container:null,items:[],last_displayed:null,setup:function(){this.container=$("lawyers-container");if(!this.container){return}var b=this;$(this.container).addClassName("cvs-loaded");this.items=$(this.container).select(".cv");var a=$$("body").first();Event.observe(a,"keyup",this.keyListener.bind(this));Event.observe(a,"click",this.bodyClickListener.bind(this));this.items.each(function(f){var h=$(f).select("h3").first();var e=$(h).cloneNode(true);var i=document.createElement("a");i.setAttribute("href","#");i.appendChild(h.firstChild);Event.observe(i,"mouseover",b.mouseoverListener.bind(b));Event.observe(i,"mouseout",b.mouseoutListener.bind(b));Event.observe(i,"click",b.clickListener.bind(b));$(h).appendChild(i);var m=document.createElement("div");$(m).addClassName("cv-details");var j=document.createElement("div");$(j).addClassName("cv-data");var k=document.createElement("a");k.setAttribute("href","#");$(k).addClassName("close");k.appendChild(document.createTextNode("zatvori"));Event.observe(k,"click",b.closeListener.bind(b));var l=$(f).select("table").first();var d=$(f).select(".photo").first();var g=$(f).select(".tools").first();$(j).appendChild(e);$(j).appendChild(d);$(j).appendChild(l);$(m).appendChild(j);$(m).appendChild(g);$(m).appendChild(k);$(f).appendChild(m)});var c=$(this.container).select(".tabs li a");c.each(function(d){Event.observe(d,"click",b.tabListener.bind(b))})},keyListener:function(a){if(a.keyCode==27){this.closeDetails()}},bodyClickListener:function(b){var a=Event.element(b);if(!$(a).up(".cv-details")){this.closeDetails()}},tabListener:function(a){this.closeDetails()},closeDetails:function(){if(this.last_displayed!=null){$(this.last_displayed).removeClassName("cv-displayed");this.last_displayed=null}},clickListener:function(c){Event.stop(c);var a=Event.findElement(c,"a");if(this.last_displayed!=null){$(this.last_displayed).removeClassName("cv-displayed")}var b=$(a).up(".cv");$(b).addClassName("cv-displayed");this.last_displayed=b},closeListener:function(b){Event.stop(b);var a=Event.findElement(b,"a");this.closeDetails()},mouseoutListener:function(c){var a=Event.findElement(c,"a");var b=$(a).up(".cv");$(b).removeClassName("cv-active")},mouseoverListener:function(b){var a=Event.findElement(b,"a");this.toggle(a)},toggle:function(a){var b=$(a).up(".cv");$(b).addClassName("cv-active")}};var rewards_handler={container:null,items:[],last_displayed:null,setup:function(){this.container=$("memberships-and-rewards");if(!this.container){return}$(this.container).addClassName("loaded");var a=document.createElement("p");$(a).addClassName("view-details");var b=document.createElement("a");b.setAttribute("href","#");var e=$$("body").first();Event.observe(e,"keyup",this.keyListener.bind(this));Event.observe(e,"click",this.bodyClickListener.bind(this));if($(e).hasClassName("en")){b.appendChild(document.createTextNode("Memberships and Rewards"));a.appendChild(document.createTextNode("View the whole list of our "))}else{b.appendChild(document.createTextNode("Članstva i priznanja"));a.appendChild(document.createTextNode("Pogledaj cijelu listu "))}a.appendChild(b);$("rewards-details").insert({before:a});Event.observe(b,"click",this.clickListener.bind(this));var d=$(this.container).select("h2").first();var f=$(d).cloneNode(true);var c=document.createElement("a");c.setAttribute("href","#");$(c).addClassName("close");c.appendChild(document.createTextNode("zatvori"));Event.observe(c,"click",this.closeListener.bind(this));$("rewards-details").insert({top:f});$("rewards-details").insert({bottom:c})},keyListener:function(a){if(a.keyCode==27){this.closeDetails()}},bodyClickListener:function(b){var a=Event.element(b);if($(a).identify()=="rewards-details"){return}if(!$(a).up("#rewards-details")){this.closeDetails()}},clickListener:function(a){Event.stop(a);$(this.container).addClassName("expanded")},closeListener:function(a){Event.stop(a);this.closeDetails()},closeDetails:function(){$(this.container).removeClassName("expanded")}};var element_over=Class.create();element_over.prototype={container:null,list:[],element_name:null,target_classname:null,initialize:function(c,b,a){this.container=$(c);if(!this.container){return}var d=this;if(ie8&&(c=="publications"||c=="navigation")){return}this.target_classname=a;this.element_name=b;this.items=$(this.container).select(b);this.items.each(function(e){if(!$(e).hasClassName("prev")&&!$(e).hasClassName("next")){Event.observe(e,"mouseover",d.mouseoverListener.bind(d));Event.observe(e,"mouseout",d.mouseoutListener.bind(d))}})},mouseoverListener:function(b){Event.stop(b);var a=Event.findElement(b,this.element_name);this.toggle(a,"on")},mouseoutListener:function(b){Event.stop(b);var a=Event.findElement(b,this.element_name);this.toggle(a,"off")},toggle:function(c,b){var a=$(this.container).select(".over").first();if(a){$(a).removeClassName(this.target_classname);$(a).removeClassName("first-over");$(a).removeClassName("last-over")}if(b=="on"){$(c).addClassName(this.target_classname);if($(c).hasClassName("first-child")){$(c).addClassName("first-over")}if($(c).hasClassName("last-child")){$(c).addClassName("last-over")}}else{$(c).removeClassName(this.target_classname);$(c).removeClassName("first-over");$(c).removeClassName("last-over")}}};var contact_handler={setup:function(){var b=$$("#modify-entry a").first();if(b){Event.observe(b,"click",this.modifyEntryListener.bind(this))}var a=$$("#send-another a").first();if(a){Event.observe(a,"click",this.sendAnotherListener.bind(this))}},modifyEntryListener:function(a){Event.stop(a);$("contact-form-container").removeClassName("has-error")},sendAnotherListener:function(a){Event.stop(a);$("contact-form-container").removeClassName("has-confirmation")}};var language_handler={container:null,setup:function(){this.container=$("language");if(!this.container){return}var b=$$("body").first();var a=$(b).hasClassName("en")?$("lang-hr"):$("lang-en");Event.observe(a,"mouseover",this.mouseoverListener.bind(this));Event.observe(a,"mouseout",this.mouseoutListener.bind(this))},mouseoverListener:function(a){Event.stop(a);$(this.container).addClassName("over")},mouseoutListener:function(a){Event.stop(a);$(this.container).removeClassName("over")}};var publications_handler={container:null,items:[],setup:function(){var a=this;this.container=$("publications");if(!this.container){return}this.items=$(this.container).select("li");this.items.each(function(b){Event.observe(b,"click",a.clickListener.bind(a))})},clickListener:function(b){var a=Event.element(b);if(a.nodeName.toLowerCase()=="a"){return true}Event.stop(b);if(a.nodeName.toLowerCase()!="li"){a=$(a).up("li")}document.location=$(a).select("a").first().getAttribute("href")}};var png_replacement={items:[],setup:function(){this.items=$$("#content .cv .photo img");this.items.each(function(c){var b=$(c).up("div");var a=c.getAttribute("src");if(a.indexOf(".png")!=-1){$(b).addClassName("has-png");b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='"+a+"', sizingMethod='crop')"}})}};var tabber=Class.create();tabber.prototype={container:null,tabber_items:[],navigation:[],last_position:null,initialize:function(b,a){this.container=$(b);if(!this.container){return}$(this.container).addClassName("loaded");$(this.container).removeClassName("load-pending");this.tabber_items=$(this.container).select("."+a);this.renderNav();if(b=="lawyers-container"){var c=this;setTimeout(function(){c.setupHeight()},200)}},renderNav:function(){var c=this;var b=document.createElement("ul");b.className="tabs";var a=0;this.tabber_items.each(function(i){var f=document.createElement("li");var e=false;if($(i).hasClassName("locked")){$(f).addClassName("locked");e=true}var h=$(i).select("h2").first().firstChild.nodeValue;if(e){var j=document.createTextNode(h);f.appendChild(j)}else{var g=document.createElement("a");g.setAttribute("href","#");var d=document.createTextNode(h);g.appendChild(d);f.appendChild(g);Event.observe(g,"click",c.clickListener.bind(c))}b.appendChild(f)});$(b).select("li").first().addClassName("first-child");$(this.container).insert({top:b});this.navigation=b;this.setActive(a)},setupHeight:function(){var a=0;this.tabber_items.each(function(b){var c=$(b).getHeight();if(c>a){a=c}});a=a-26-27-10;this.tabber_items.each(function(b){b.style.minHeight=a+"px";b.style.height=a+"px"})},prevNextListener:function(d){Event.stop();var a=Event.findElement(d,"a");var c=a.up("li");if(c.hasClassName("prev")){var b=this.last_position-1;if(b<0){b=0}}else{if(c.hasClassName("next")){var b=this.last_position+1;if(b>=this.tabber_items.size()){b=this.tabber_items.size()-1}}}if(b==this.last_position){return}this.setActive(b)},clickListener:function(b){Event.stop(b);var a=Event.findElement(b,"a");this.toggle(a)},toggle:function(c){var b=0;var d=$(c).up("li");var a=$(this.navigation).select("li");b=$(a).indexOf(d);if(b==this.last_position){return}this.setActive(b)},setActive:function(a){var b=$(this.container).select("div.active").first();if(!b){a=0}if(this.last_position!=null){this.tabber_items[this.last_position].removeClassName("active");$(this.navigation).select("li")[this.last_position].removeClassName("active")}this.tabber_items[a].addClassName("active");$(this.navigation).select("li")[a].addClassName("active");this.last_position=a}};var homepage_flash={setup:function(){if(typeof SWFObject=="function"&&$("home")&&$("content")){var a=$("home").hasClassName("hr")?"hr":"en";var c="/flash/intro-"+a+".swf";var b=new SWFObject(c,"home-flash",940,316,9,"#efefef");b.addParam("scale","noscale");b.addParam("wmode","transparent");b.addParam("salign","tl");b.addParam("menu","false");b.write("content")}}};function init(){var b=$$("body").first();$(b).addClassName("js-enabled");if(typeof tabber=="function"){var c=new tabber("lawyers-container","office")}if(typeof cvs_handler=="object"){cvs_handler.setup()}if(typeof practices_handler=="object"){practices_handler.setup()}if(typeof tabber=="function"){var a=new tabber("offices-container","office")}if(typeof rewards_handler=="object"){rewards_handler.setup()}if(typeof contact_handler=="object"){contact_handler.setup()}if(typeof language_handler=="object"){language_handler.setup()}if(typeof publications_handler=="object"){publications_handler.setup()}if(typeof homepage_flash=="object"){homepage_flash.setup()}if(ie6&&typeof png_replacement=="object"){png_replacement.setup()}if(typeof element_over=="function"){new element_over("publications","li","over");new element_over("navigation","li","over")}};