!function($){$.timer=function(func,time,autostart){return this.set=function(func,time,autostart){if(this.init=!0,"object"==typeof func){var paramList=["autostart","time"];for(var arg in paramList)null!=func[paramList[arg]]&&eval(paramList[arg]+" = func[paramList[arg]]");func=func.action}return"function"==typeof func&&(this.action=func),isNaN(time)||(this.intervalTime=time),autostart&&!this.active&&(this.active=!0,this.setTimer()),this},this.once=function(t){var e=this;return isNaN(t)&&(t=0),window.setTimeout(function(){e.action()},t),this},this.play=function(t){return this.active||(t?this.setTimer():this.setTimer(this.remaining),this.active=!0),this},this.pause=function(){return this.active&&(this.active=!1,this.remaining-=new Date-this.last,this.clearTimer()),this},this.stop=function(){return this.active=!1,this.remaining=this.intervalTime,this.clearTimer(),this},this.toggle=function(t){return this.active?this.pause():t?this.play(!0):this.play(),this},this.reset=function(){return this.active=!1,this.play(!0),this},this.clearTimer=function(){window.clearTimeout(this.timeoutObject)},this.setTimer=function(t){var e=this;"function"==typeof this.action&&(isNaN(t)&&(t=this.intervalTime),this.remaining=t,this.last=new Date,this.clearTimer(),this.timeoutObject=window.setTimeout(function(){e.go()},t))},this.go=function(){this.active&&(this.action(),this.setTimer())},this.init?new $.timer(func,time,autostart):(this.set(func,time,autostart),this)},$.fn.polyglotLanguageSwitcher=function(t){var s,e,u=$.fn.polyglotLanguageSwitcher,f=$(this),i=$(this).attr("id"),o=$('
'),r=0,n=!1,c=[],l=$.extend({},u.defaults,t),m="static"==l.websiteType;function d(t){l[t.name]&&l[t.name].call($(this),t)}function h(){n||(d({name:"beforeOpen",element:f,instance:u}),s.addClass("active"),a(!0),setTimeout(function(){n=!0,d({name:"afterOpen",element:f,instance:u})},100))}function p(){n&&(d({name:"beforeClose",element:f,instance:u}),a(!1),s.removeClass("active"),n=!1,e&&e.active&&e.clearTimer(),d({name:"afterClose",element:f,instance:u}))}function v(){e&&e.active&&e.pause()}function g(){e&&e.play(!1)}function a(t){"fade"==l.effect?t?o.fadeIn(l.animSpeed):o.fadeOut(l.animSpeed):t?o.slideDown(l.animSpeed):o.slideUp(l.animSpeed)}function w(t){p();var e=$(t).children(":first-child"),i=$(e).attr("id"),n=$(e).text();$(o).children().each(function(){$(this).detach()});for(var a=0;a form > select > option");{var e;m&&(e=window.location.href,t.each(function(){var t=$(this).attr("id");0<=e.indexOf("/"+t+"/")&&(a=t)}))}t.each(function(){var t=$(this).attr("id"),e=m?a===t:$(this).attr("selected"),i=function(t){var e,i=$(t).attr("id"),n=$(t).attr("value"),a=$(t).text();{var r,s,o,c,h;e=m?(r=window.location.href,s=r.substring(r.lastIndexOf("/")+1),o="http://"+document.domain+"/"+l.pagePrefix+i+"/"+s,$('- '+a+"
")):(c=document.URL.replace("#",""),(h=function(){var t={},e=window.location.search.substr(1).split("&");if(0'+a+""))}e.bind("click",function(){d({name:"onChange",selectedItem:$(this).children(":first").attr("id"),element:f,instance:u}),w($(this))}),"hover"==l.openMode&&e.hover(function(){v()},function(){g()});return e}($(this));e&&(n=i),c.push(i),0'+$(this).text()+' »'),"hover"==l.openMode?s.hover(function(){h(),v()},function(){g()}):s.click(function(){h()})),r++}),$("#"+i+" form:first-child").remove(),f.append(s),f.append(o),n&&w(n)}(),$(document).click(function(){p()}),$(document).keyup(function(t){27==t.which&&p()}),"hover"==l.openMode&&(e=$.timer(function(){p()})).set({time:l.hoverTimeout,autostart:!0}),u.open=function(){h()},u.close=function(){p()},d({name:"afterLoad",element:f,instance:u}),u};var ls=$.fn.polyglotLanguageSwitcher;ls.defaults={openMode:"click",hoverTimeout:1500,animSpeed:200,effect:"slide",paramName:"lang",pagePrefix:"",websiteType:"dynamic",testMode:!1,onChange:NaN,afterLoad:NaN,beforeOpen:NaN,afterOpen:NaN,beforeClose:NaN,afterClose:NaN}}(jQuery);