Array.prototype.unique=function(c){var e=[],f,d=this.length;for(f=0;f<d;f++){if(e.indexOf(this[f],0,c)<0){e.push(this[f]);}}return e;};String.prototype.format=function(){var b=/\{\d+\}/g;var a=arguments;return this.replace(b,function(c){return a[c.match(/\d+/)];});};Element.Events.keyenter={base:"keypress",condition:function(a){return a.key=="enter";}};var AddQueryStringParametersAndGo=function(c,a,b){if(!c.match(/\w+=\w+/)){alert("improper format for par..."+c);return false;}a=a||"";var j=new String(document.location);var g="";var d="";var e=new Object();if(j.indexOf("?")>-1&&b!=1){g=j.split("?")[0];d=j.split("?")[1];arrBasePars=d.split("&");for(var f=0;f<arrBasePars.length;f++){n=arrBasePars[f].split("=")[0];v=arrBasePars[f].split("=")[1];e[n]=v;}}arrParlist=c.split("&");for(var f=0;f<arrParlist.length;f++){par_name=arrParlist[f].split("=")[0];par_value=arrParlist[f].split("=")[1];e[par_name]=par_value;}var k="";for(f in e){k+=f+"="+e[f]+"&";}k=k.slice(0,-1);window.location=(a==""?g:a)+"?"+k;};var bookmarksite=function(c,a){if(window.sidebar){window.sidebar.addPanel(c,a,"");}else{if(window.opera&&window.print){var b=document.createElement("a");b.setAttribute("href",a);b.setAttribute("title",c);b.setAttribute("rel","sidebar");b.click();}else{if(document.all){window.external.AddFavorite(a,c);}}}};var windowOpener=function(b,a,c){window.open(b,a,c);};var toggleMe=function(b,a){x=document.getElementById(b);y=document.getElementById(a);if(x.style.display=="none"){x.style.display="block";y.src="/img/less.gif";}else{x.style.display="none";y.src="/img/more.gif";}};var toggleMe_alt=function(b,a){x=document.getElementById(b);y=document.getElementById(a);if(x.style.visibility=="visible"){x.style.visibility="hidden";x.style.position="absolute";y.src="img/more.gif";}else{x.style.visibility="visible";x.style.position="static";y.src="img/less.gif";}};var toggleMe_v2=function(a){x=document.getElementById(a);if(x.style.visibility=="visible"){x.style.visibility="hidden";x.style.display="none";}else{x.style.visibility="visible";x.style.display="block";}};var toggleMe_v3=function(c,a,b){x=document.getElementById(c);x2=document.getElementById(a);h=document.getElementById(b);if(x.style.visibility=="visible"){x.style.visibility="hidden";x.style.display="none";x2.style.visibility="visible";x2.style.display="block";$(h).set("html","Več ...");}else{x.style.visibility="visible";x.style.display="block";x2.style.visibility="hidden";x2.style.display="none";$(h).set("html","... manj");}};var toggleMe_v4=function(d,a,c,b){x=document.getElementById(d);x2=document.getElementById(a);h=document.getElementById(c);less=$(b);if(x.style.visibility=="visible"){x.style.visibility="hidden";less.style.visibility="hidden";less.setAttribute("class","");less.setAttribute("className","");less.set("html","");x.style.display="none";x2.style.visibility="visible";x2.style.display="block";}else{less.setAttribute("class","link-arrow-updown");less.setAttribute("className","link-arrow-updown");less.set("html","... manj");less.style.visibility="visible";x.style.visibility="visible";x.style.display="block";x2.style.visibility="hidden";x2.style.display="none";}};var checkEnterKey=function(b){var a;if(window.event){a=window.event.keyCode;}else{a=b.which;}if(a==13){return true;}else{return false;}};var checkLength=function(a){l=a.value;l=l.replace(search_regexp_disallowchars,"");a.value=l;if(l.length<=1){alert("Iskalni niz je prekratek. Prosim vtipkajte vsaj 2 znaka.");return false;}else{return true;}};var countWords=function(d,a){var b=d.value.length;var c=document.getElementById("count_"+d.name);if(c!=null){c.innerHTML=(b);}else{c.innerHTML=0;}};var lt=function(f,e,j,i){var g=new Request({url:ApplicationRelativePath+"lt.aspx",link:"cancel",data:"a="+f+"&b="+e+"&c="+j+"&d="+i}).send();};window.addEvent("load",function(){var a=$$(".text_subscribe");a.each(function(b){b.addEvent("keyenter",function(c){c.stop();$(".cmdSubscribe").click();});});$$("input[type=hidden].lt").each(function(c){var b=c.get("value").split(",");lt(b[0],b[1],b[2],b[3]);});});sessvars=function(){var x={};x.$={prefs:{memLimit:2000,autoFlush:true,crossDomain:false,includeProtos:false,includeFunctions:false},parent:x,clearMem:function(){for(var i in this.parent){if(i!="$"){this.parent[i]=undefined;}}this.flush();},usedMem:function(){x={};return Math.round(this.flush(x)/1024);},usedMemPercent:function(){return Math.round(this.usedMem()/this.prefs.memLimit);},flush:function(x){var y,o={},j=this.$$;x=x||top;for(var i in this.parent){o[i]=this.parent[i];}o.$=this.prefs;j.includeProtos=this.prefs.includeProtos;j.includeFunctions=this.prefs.includeFunctions;y=this.$$.make(o);if(x!=top){return y.length;}if(y.length/1024>this.prefs.memLimit){return false;}x.name=y;return true;},getDomain:function(){var l=location.href;l=l.split("///").join("//");l=l.substring(l.indexOf("://")+3).split("/")[0];while(l.split(".").length>2){l=l.substring(l.indexOf(".")+1);}return l;},debug:function(t){var t=t||this,a=arguments.callee;if(!document.body){setTimeout(function(){a(t);},200);return;}t.flush();var d=document.getElementById("sessvarsDebugDiv");if(!d){d=document.createElement("div");document.body.insertBefore(d,document.body.firstChild);}d.id="sessvarsDebugDiv";d.getElementsByTagName("span")[0].onclick=function(){t.clearMem();location.reload();};},init:function(){var o={},t=this;try{o=this.$$.toObject(top.name);}catch(e){o={};}this.prefs=o.$||t.prefs;if(this.prefs.crossDomain||this.prefs.currentDomain==this.getDomain()){for(var i in o){this.parent[i]=o[i];}}else{this.prefs.currentDomain=this.getDomain();}this.parent.$=t;t.flush();var f=function(){if(t.prefs.autoFlush){t.flush();}};if(window.addEventListener){addEventListener("unload",f,false);}else{if(window.attachEvent){window.attachEvent("onunload",f);}else{this.prefs.autoFlush=false;}}}};x.$.$$={compactOutput:false,includeProtos:false,includeFunctions:false,detectCirculars:true,restoreCirculars:true,make:function(arg,restore){this.restore=restore;this.mem=[];this.pathMem=[];return this.toJsonStringArray(arg).join("");},toObject:function(x){if(!this.cleaner){try{this.cleaner=new RegExp('^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$');}catch(a){this.cleaner=/^(true|false|null|\[.*\]|\{.*\}|".*"|\d+|\d+\.\d+)$/;}}if(!this.cleaner.test(x)){return{};}eval("this.myObj="+x);if(!this.restoreCirculars||!alert){return this.myObj;}if(this.includeFunctions){var x=this.myObj;for(var i in x){if(typeof x[i]=="string"&&!x[i].indexOf("JSONincludedFunc:")){x[i]=x[i].substring(17);eval("x[i]="+x[i]);}}}this.restoreCode=[];this.make(this.myObj,true);var r=this.restoreCode.join(";")+";";eval('r=r.replace(/\\W([0-9]{1,})(\\W)/g,"[$1]$2").replace(/\\.\\;/g,";")');eval(r);return this.myObj;},toJsonStringArray:function(arg,out){if(!out){this.path=[];}out=out||[];var u;switch(typeof arg){case"object":this.lastObj=arg;if(this.detectCirculars){var m=this.mem;var n=this.pathMem;for(var i=0;i<m.length;i++){if(arg===m[i]){out.push('"JSONcircRef:'+n[i]+'"');return out;}}m.push(arg);n.push(this.path.join("."));}if(arg){if(arg.constructor==Array){out.push("[");for(var i=0;i<arg.length;++i){this.path.push(i);if(i>0){out.push(",\n");}this.toJsonStringArray(arg[i],out);this.path.pop();}out.push("]");return out;}else{if(typeof arg.toString!="undefined"){out.push("{");var first=true;for(var i in arg){if(!this.includeProtos&&arg[i]===arg.constructor.prototype[i]){continue;}this.path.push(i);var curr=out.length;if(!first){out.push(this.compactOutput?",":",\n");}this.toJsonStringArray(i,out);out.push(":");this.toJsonStringArray(arg[i],out);if(out[out.length-1]==u){out.splice(curr,out.length-curr);}else{first=false;}this.path.pop();}out.push("}");return out;}}return out;}out.push("null");return out;case"unknown":case"undefined":case"function":if(!this.includeFunctions){out.push(u);return out;}arg="JSONincludedFunc:"+arg;out.push('"');var a=["\n","\\n","\r","\\r",'"','\\"'];arg+="";for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1]);}out.push(arg);out.push('"');return out;case"string":if(this.restore&&arg.indexOf("JSONcircRef:")==0){this.restoreCode.push("this.myObj."+this.path.join(".")+"="+arg.split("JSONcircRef:").join("this.myObj."));}out.push('"');var a=["\n","\\n","\r","\\r",'"','\\"'];arg+="";for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1]);}out.push(arg);out.push('"');return out;default:out.push(String(arg));return out;}}};x.$.init();return x;}();window.addEvent("domready",function(){var f=new Date();var b=jQuery("#navigation");var c=1000*60*60*24;var e=false;if(b!==undefined&&b!=null){var a=sessvars.cenejePage;if(a===undefined||a==null){e=true;}else{var g=(a.time+c-f.getTime())/1000;if(g<0){e=true;}else{if(a.menu.indexOf("Stran bo kmalu na voljo")>0||a.menu.indexOf("Error 404")>0){a=null;e=true;}b.html(a.menu);handleNavigation();}}if(e){new Request({url:ApplicationRelativePath+"navigation.aspx",link:"cancel",onSuccess:function(d){b.html(d);handleNavigation();sessvars.cenejePage={menu:d,time:f.getTime()};},onFailure:function(){sessvars.cenejePage=null;}}).send();}}});function handleNavigation(){if(jQuery("#banner_middle")){jQuery("#banner_middle").css("display","none");}$$(".navigation-top-popup, .navigation-top-popup-main").fade("hide");if($$(".fld-search-main")[0]){$$(".fld-search-main")[0].addEvent("click",function(a){$$(".navigation-top-popup, .navigation-top-popup-main").fade("hide");});$$(".fld-search-main")[0].addEvent("focus",function(a){$$(".navigation-top-popup, .navigation-top-popup-main").fade("hide");});$$(".fld-search-main")[0].addEvent("keypress",function(a){$$(".navigation-top-popup, .navigation-top-popup-main").fade("hide");});}$$(".ul-nav-main li, .merkur-ul-nav-main li").each(function(b,a){b.addEvents({mouseenter:function(g){$$(".navigation-top-popup, .navigation-top-popup-main").set("tween",{duration:10,transition:Fx.Transitions.Expo.easeOut});$$(".navigation-top-popup, .navigation-top-popup-main").fade("hide");var f=this.id.split("_")[1];if(f!=undefined){var d="popup_"+f;var c=this.getStyle("width");c=c.substring(0,c.length-2);if(d=="popup_ostalo"){$(d).style.left=this.offsetLeft-220+parseInt(c)+"px";}else{if($(d).hasClass("last")){$(d).style.left=this.offsetLeft-520+parseInt(c)+"px";}else{$(d).style.left=this.offsetLeft+0+"px";}}$(d).set("tween",{duration:400});$(d).fade("in");}},mouseleave:function(f){var d=this.id.split("_")[1];if(d!=undefined){var c="popup_"+d;$(c).set("tween",{duration:150,transition:Fx.Transitions.Expo.easeIn});$(c).fade("out");}}});});$$(".navigation-top-popup, .navigation-top-popup-main").each(function(b,a){b.addEvents({mouseenter:function(c){this.set("tween",{duration:30});this.fade("in");},mouseleave:function(c){this.set("tween",{duration:150,transition:Fx.Transitions.Expo.easeIn});this.fade("out");}});});}var Autocompleter=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:"inherit",maxChoices:10,injectChoice:null,customChoices:null,emptyChoices:null,visibleChoices:true,className:"autocompleter-choices",zIndex:1642,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:", ",separatorSplit:/\s*[,;]\s*/,autoTrim:false,allowDupes:false,cache:true,relative:false},initialize:function(b,a){this.element=$(b);this.setOptions(a);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({delay:this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter){this.filter=this.options.filter.bind(this);}var c=this.options.selectMode;this.typeAhead=(c=="type-ahead");this.selectMode=(c===true)?"selection":c;this.cached=[];},build:function(){if($(this.options.customChoices)){this.choices=this.options.customChoices;}else{this.choices=new Element("ul",{"class":this.options.className,id:"ul_ac_aver",styles:{zIndex:this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,"after");this.relative=this.element.getOffsetParent();}this.fix=new OverlayFix(this.choices);}if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator;}this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({property:"opacity",link:"cancel",duration:200},this.options.fxOptions)).addEvent("onStart",Chain.prototype.clearChain).set(0);this.element.setProperty("autocomplete","off").addEvent((Browser.Engine.trident||Browser.Engine.webkit)?"keydown":"keypress",this.onCommand.bind(this)).addEvent("click",this.onCommand.bind(this,[false])).addEvent("focus",this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent("blur",this.toggleFocus.create({bind:this,arguments:false,delay:100}));},destroy:function(){if(this.fix){this.fix.destroy();}this.choices=this.selected=this.choices.destroy();},toggleFocus:function(a){this.focussed=a;if(!a){this.hideChoices(true);}this.fireEvent((a)?"onFocus":"onBlur",[this.element]);},onCommand:function(a){if(!a&&this.focussed){return this.prefetch();}if(a&&a.key&&!a.shift){switch(a.key){case"enter":if(this.element.value!=this.opted){return true;}if(this.selected&&this.visible){this.choiceSelect(this.selected);return !!(this.options.autoSubmit);}break;case"esc":case"tab":this.hideChoices(true);break;}}return true;},setSelection:function(f){var g=this.selected.inputValue,h=g;var a=this.queryValue.length,c=g.length;if(g.substr(0,a).toLowerCase()!=this.queryValue.toLowerCase()){a=0;}if(this.options.multiple){var e=this.options.separatorSplit;h=this.element.value;a+=this.queryIndex;c+=this.queryIndex;var b=h.substr(this.queryIndex).split(e,1)[0];h=h.substr(0,this.queryIndex)+g+h.substr(this.queryIndex+b.length);if(f){var d=h.split(this.options.separatorSplit).filter(function(j){return this.test(j);},/[^\s,]+/);if(!this.options.allowDupes){d=[].combine(d);}var i=this.options.separator;h=d.join(i)+i;c=h.length;}}this.observer.setValue(h);this.opted=h;if(f||this.selectMode=="pick"){a=c;}this.element.selectRange(a,c);this.fireEvent("onSelection",[this.element,this.selected,h,g]);},showChoices:function(){var c=this.options.choicesMatch,b=this.choices.getFirst(c);this.selected=this.selectedValue=null;if(this.fix){var e=this.element.getCoordinates(this.relative),a=this.options.width||"auto";this.choices.setStyles({left:e.left,top:e.bottom,width:(a===true||a=="inherit")?e.width:a});}if(!b){return;}if(!this.visible){this.visible=true;this.choices.setStyle("display","");if(this.fx){this.fx.start(1);}this.fireEvent("onShow",[this.element,this.choices]);}if(this.options.selectFirst||this.typeAhead||b.inputValue==this.queryValue){this.choiceOver(b,this.typeAhead);}var d=this.choices.getChildren(c),f=this.options.maxChoices;var i={overflowY:"hidden",height:""};this.overflown=false;if(d.length>f){var j=d[f-1];i.overflowY="scroll";i.height=j.getCoordinates(this.choices).bottom;this.overflown=true;}this.choices.setStyles(i);this.fix.show();if(this.options.visibleChoices){var h=document.getScroll(),k=document.getSize(),g=this.choices.getCoordinates();if(g.right>h.x+k.x){h.x=g.right-k.x;}if(g.bottom>h.y+k.y){h.y=g.bottom-k.y;}window.scrollTo(Math.min(h.x,g.left),Math.min(h.y,g.top));}},hideChoices:function(a){if(a){var c=this.element.value;if(this.options.forceSelect){c=this.opted;}if(this.options.autoTrim){c=c.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);}this.observer.setValue(c);}if(!this.visible){return;}this.visible=false;if(this.selected){this.selected.removeClass("autocompleter-selected");}this.observer.clear();var b=function(){this.choices.setStyle("display","none");this.fix.hide();}.bind(this);if(this.fx){this.fx.start(0).chain(b);}else{b();}this.fireEvent("onHide",[this.element,this.choices]);},prefetch:function(){var f=this.element.value,e=f;if(this.options.multiple){var c=this.options.separatorSplit;var a=f.split(c);var b=this.element.getSelectedRange().start;var g=f.substr(0,b).split(c);var d=g.length-1;b-=g[d].length;e=a[d];}if(e.length<this.options.minLength){this.hideChoices();}else{if(e===this.queryValue||(this.visible&&e==this.selectedValue)){if(this.visible){return false;}this.showChoices();}else{this.queryValue=e;this.queryIndex=b;if(!this.fetchCached()){this.query();}}}return true;},fetchCached:function(){return false;if(!this.options.cache||!this.cached||!this.cached.length||this.cached.length>=this.options.maxChoices||this.queryValue){return false;}this.update(this.filter(this.cached));return true;},update:function(b){this.choices.empty();this.cached=b;var a=b&&$type(b);if(!a||(a=="array"&&!b.length)||(a=="hash"&&!b.getLength())){(this.options.emptyChoices||this.hideChoices).call(this);}else{if(this.options.maxChoices<b.length&&!this.options.overflow){b.length=this.options.maxChoices;}b.each(this.options.injectChoice||function(d){var c=new Element("li",{html:this.markQueryValue(d)});c.inputValue=d;this.addChoiceEvents(c).inject(this.choices);},this);this.showChoices();}},choiceOver:function(c,d){if(!c||c==this.selected){return;}if(this.selected){this.selected.removeClass("autocompleter-selected");}this.selected=c.addClass("autocompleter-selected");this.fireEvent("onSelect",[this.element,this.selected,d]);if(!this.selectMode){this.opted=this.element.value;}if(!d){return;}this.selectedValue=this.selected.inputValue;if(this.overflown){var f=this.selected.getCoordinates(this.choices),e=this.options.overflowMargin,g=this.choices.scrollTop,a=this.choices.offsetHeight,b=g+a;if(f.top-e<g&&g){this.choices.scrollTop=Math.max(f.top-e,0);}else{if(f.bottom+e>b){this.choices.scrollTop=Math.min(f.bottom-a+e,b);}}}if(this.selectMode){this.setSelection();}},choiceSelect:function(a){if(a){this.choiceOver(a);}this.setSelection(true);this.queryValue=false;this.hideChoices();},filter:function(a){return(a||this.tokens).filter(function(b){return this.test(b);},new RegExp(((this.options.filterSubset)?"":"^")+this.queryValue.escapeRegExp(),(this.options.filterCase)?"":"i"));},markQueryValue:function(a){return(!this.options.markQuery||!this.queryValue)?a:a.replace(new RegExp("("+((this.options.filterSubset)?"":"^")+this.queryValue.escapeRegExp()+")",(this.options.filterCase)?"":"i"),'<span class="autocompleter-queried">$1</span>');},addChoiceEvents:function(a){return a.addEvents({mouseover:this.choiceOver.bind(this,[a]),click:this.choiceSelect.bind(this,[a])});}});var OverlayFix=new Class({initialize:function(a){if(Browser.Engine.trident){this.element=$(a);this.relative=this.element.getOffsetParent();this.fix=new Element("iframe",{frameborder:"0",scrolling:"no",src:"javascript:false;",styles:{position:"absolute",border:"none",display:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}}).inject(this.element,"after");}},show:function(){if(this.fix){var a=this.element.getCoordinates(this.relative);delete a.right;delete a.bottom;this.fix.setStyles($extend(a,{display:"",zIndex:(this.element.getStyle("zIndex")||1)-1}));}return this;},hide:function(){if(this.fix){this.fix.setStyle("display","none");}return this;},destroy:function(){if(this.fix){this.fix=this.fix.destroy();}}});Element.implement({getSelectedRange:function(){if(!Browser.Engine.trident){return{start:this.selectionStart,end:this.selectionEnd};}var e={start:0,end:0};var a=this.getDocument().selection.createRange();if(!a||a.parentElement()!=this){return e;}var c=a.duplicate();if(this.type=="text"){e.start=0-c.moveStart("character",-100000);e.end=e.start+a.text.length;}else{var b=this.value;var d=b.length-b.match(/[\n\r]*$/)[0].length;c.moveToElementText(this);c.setEndPoint("StartToEnd",a);e.end=d-c.text.length;c.setEndPoint("StartToStart",a);e.start=d-c.text.length;}return e;},selectRange:function(d,a){if(Browser.Engine.trident){var c=this.value.substr(d,a-d).replace(/\r/g,"").length;d=this.value.substr(0,d).replace(/\r/g,"").length;var b=this.createTextRange();b.collapse(true);b.moveEnd("character",d+c);b.moveStart("character",d);b.select();}else{this.focus();this.setSelectionRange(d,a);}return this;}});Autocompleter.Base=Autocompleter;Autocompleter.Request=new Class({Extends:Autocompleter,options:{postData:{},ajaxOptions:{},postVar:"value"},query:function(){var c=$unlink(this.options.postData)||{};c[this.options.postVar]=this.queryValue;var b=$(this.options.indicator);if(b){b.setStyle("display","");}var a=this.options.indicatorClass;if(a){this.element.addClass(a);}this.fireEvent("onRequest",[this.element,this.request,c,this.queryValue]);this.request.send({data:c});},queryResponse:function(){var b=$(this.options.indicator);if(b){b.setStyle("display","none");}var a=this.options.indicatorClass;if(a){this.element.removeClass(a);}return this.fireEvent("onComplete",[this.element,this.request]);}});Autocompleter.Request.JSON=new Class({Extends:Autocompleter.Request,initialize:function(c,b,a){this.parent(c,a);this.request=new Request.JSON($merge({url:b,link:"cancel"},this.options.ajaxOptions)).addEvent("onComplete",this.queryResponse.bind(this));},queryResponse:function(a){this.parent();this.update(a);}});Autocompleter.Request.HTML=new Class({Extends:Autocompleter.Request,initialize:function(c,b,a){this.parent(c,a);this.request=new Request.HTML($merge({url:b,link:"cancel",update:this.choices},this.options.ajaxOptions)).addEvent("onComplete",this.queryResponse.bind(this));},queryResponse:function(a,b){this.parent();if(!b||!b.length){this.hideChoices();}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(c){var d=c.innerHTML;c.inputValue=d;this.addChoiceEvents(c.set("html",this.markQueryValue(d)));},this);this.showChoices();}}});Autocompleter.Ajax={Base:Autocompleter.Request,Json:Autocompleter.Request.JSON,Xhtml:Autocompleter.Request.HTML};var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(c,a,b){this.element=$(c)||$$(c);this.addEvent("onFired",a);this.setOptions(b);this.bound=this.changed.bind(this);this.resume();},changed:function(){var a=this.element.get("value");if($equals(this.value,a)){return;}this.clear();this.value=a;this.timeout=this.onFired.delay(this.options.delay,this);},setValue:function(a){this.value=a;this.element.set("value",a);return this.clear();},onFired:function(){this.fireEvent("onFired",[this.value,this.element]);},clear:function(){$clear(this.timeout||null);return this;},pause:function(){if(this.timer){$clear(this.timer);}else{this.element.removeEvent("keyup",this.bound);}return this.clear();},resume:function(){this.value=this.element.get("value");if(this.options.periodical){this.timer=this.changed.periodical(this.options.periodical,this);}else{this.element.addEvent("keyup",this.bound);}return this;}});var $equals=function(b,a){return(b==a||JSON.encode(b)==JSON.encode(a));};window.addEvent("domready",function(){var b=$$(".strSearch")[0];var a=$$(".cmdSearch")[0];if(b){b.addEvent("keyenter",function(f){f.stop();if(checkLength(b)){AddQueryStringParametersAndGo("q="+b.value+"&page=1",ApplicationPath+"/search_new.aspx",1);}});}if(a){a.addEvent("click",function(f){f=new Event(f);f.stop();if(checkLength(b)){AddQueryStringParametersAndGo("q="+b.value+"&page=1",ApplicationPath+"/search_new.aspx",1);}});}var d=$("mySearchBox_strSearch");if(d){var c=new Autocompleter.Request.HTML(d,ApplicationRelativePath+"lookups.aspx",{onSelection:function(f,e,h,g){$("slug_product_lookup").value=e.id;if($("slug_product_lookup").value!=""){window.location=ApplicationPath+$("slug_product_lookup").value;}},onSelect:function(f,e,g){$("slug_product_lookup").value=e.id;}});}});function rate(a,c,b){new Request({url:ApplicationRelativePath+"ratings.aspx",link:"cancel",data:"t=rate&rate="+c+"&opinionID="+a,onComplete:function(d){var e=JSON.decode(d,false);if(e==null){return;}var f="";if(e.personRatedCount&&e.personRatedCount>0){if(e.personRatedCount==1){f="(1 uporabniku je mnenje všeč)";}else{if(e.personRatedCount==2){f="(2 uporabnikoma je mnenje všeč)";}else{if(e.personRatedCount>2){f="("+e.personRatedCount+" uporabnikom je mnenje všeč)";}}}}b.getElements(".product-review-useful")[0].set("html","Hvala za vaše mnenje.");b.getElements(".product-review-person-count")[0].set("html",f);}}).send();}function isRated(a,b){new Request({url:ApplicationRelativePath+"ratings.aspx",link:"cancel",data:"t=isRated&opinionID="+a,onComplete:function(c){var d=JSON.decode(c,false);if(d==null){return;}if(d.personRated){jQuery(b.getElements(".product-review-useful")[0]).remove();}}}).send();}window.addEvent("domready",function(){$$(".product-review").each(function(b){var d=b.getElements(".review-yes");var c=b.getElements(".review-no");var a=b.get("rel");b.set("rel","");if(d&&c&&a){jQuery(d).click(function(f){f.preventDefault();rate(a,1,b);});jQuery(c).click(function(f){f.preventDefault();rate(a,-1,b);});isRated(a,b);}});});function ToggleProductInBasket(d,g,h){if($("ucWelcome_lblQtyProductsInBasket")!=null){if($("ucWelcome_lblQtyProductsInBasket").innerHTML.match(/Piškotki v vašem brskalniku so očitno onemogočeni./)){alert("Piškotki v vašem brskalniku so očitno onemogočeni. Dokler jih ne omogočite, prijava na Ceneje.si ne bo delovala.");return;}}else{if($("ucWelcomeMerkur_lblQtyProductsInBasket").innerHTML.match(/Piškotki v vašem brskalniku so očitno onemogočeni./)){alert("Piškotki v vašem brskalniku so očitno onemogočeni. Dokler jih ne omogočite, prijava na Ceneje.si ne bo delovala.");return;}}h=h||"";var f=$("basket_"+d);var c=$("idList_"+d);var e=(f.hasClass("inBasket"));var a="a";var i="Odstrani";var b="ul_list_in"+h;if(e){var a="d";var i="V seznam";var b="ul_list_out"+h;}new Request({url:ApplicationRelativePath+"basket.aspx?a="+a,link:"cancel",data:"idA="+d+"&idU="+g,onComplete:function(j){if(j=="Success"){c.className=b;f.innerHTML=i;f.toggleClass("inBasket");new Request({url:ApplicationRelativePath+"basket.aspx?a=q",link:"cancel",data:"idU="+Cookie.read("idUsers"),onComplete:function(k){if($("ucWelcome_lblQtyProductsInBasket")!=null){$("ucWelcome_lblQtyProductsInBasket").innerHTML=k;}else{$("ucWelcomeMerkur_lblQtyProductsInBasket").innerHTML=k;}}}).send();}else{alert(j);}}}).send();}function ToggleProductInBasket_v2(a,c){if($("ucWelcome_lblQtyProductsInBasket")!=null){if($("ucWelcome_lblQtyProductsInBasket").innerHTML.match(/Piškotki v vašem brskalniku so očitno onemogočeni./)){alert("Piškotki v vašem brskalniku so očitno onemogočeni. Dokler jih ne omogočite, prijava na Ceneje.si ne bo delovala.");return;}}else{if($("ucWelcomeMerkur_lblQtyProductsInBasket").innerHTML.match(/Piškotki v vašem brskalniku so očitno onemogočeni./)){alert("Piškotki v vašem brskalniku so očitno onemogočeni. Dokler jih ne omogočite, prijava na Ceneje.si ne bo delovala.");return;}}var e=($(c).hasClass("inBasket"));var b="a";var d='<img width="77px" height="16px" src="'+ApplicationPath+'/pic/g_remove.gif" />';if(e){var b="d";var d="v seznam";}new Request({url:ApplicationRelativePath+"basket.aspx?a="+b,link:"cancel",data:"idA="+a+"&idU="+Cookie.read("idUsers"),onComplete:function(f){if(f=="Success"){c.innerHTML=d;if($(c).hasClass("inBasket")){$(c).set("class","link-arrow");}else{$(c).set("class","inBasket");}new Request({url:ApplicationRelativePath+"basket.aspx?a=q",link:"cancel",data:"idU="+Cookie.read("idUsers"),onComplete:function(g){if($("ucWelcome_lblQtyProductsInBasket")!=null){$("ucWelcome_lblQtyProductsInBasket").innerHTML=g;}else{$("ucWelcomeMerkur_lblQtyProductsInBasket").innerHTML=g;}}}).send();}else{alert(f);}}}).send();}window.addEvent("domready",function(){function a(){new Request({url:ApplicationRelativePath+"basket.aspx?a=q",link:"cancel",data:"idU="+Cookie.read("idUsers"),onComplete:function(b){if($("ucWelcome_lblQtyProductsInBasket")!=null){$("ucWelcome_lblQtyProductsInBasket").innerHTML=b;}else{$("ucWelcomeMerkur_lblQtyProductsInBasket").innerHTML=b;}}}).send();}a();});var tb_pathToImage=ApplicationPath+"/img/loadingAnimation.gif";jQuery.noConflict();
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
jQuery(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage;jQuery(function(){jQuery("a.lightbox").lightBox();});});function tb_init(a){jQuery(a).click(function(){var c=this.title||this.name||null;var b=this.href||this.alt;var d=this.rel||false;tb_show(c,b,d);this.blur();return false;});}function tb_show(j,b,h){try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove);}}if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{jQuery("#TB_overlay").addClass("TB_overlayBG");}if(j===null){j="";}jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");jQuery("#TB_load").show();var c;if(b.indexOf("?")!==-1){c=b.substr(0,b.indexOf("?"));}else{c=b;}var f=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\/makethumbnail/g;var k=c.toLowerCase().match(f);if(k==".jpg"||k==".jpeg"||k==".png"||k==".gif"||k==".bmp"||(c.toLowerCase().indexOf("makethumbnail")>0)){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(h){TB_TempArray=jQuery("a[@rel="+h+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(f);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var n=tb_getPageSize();var l=n[0]-150;var q=n[1]-150;var m=imgPreloader.width;var e=imgPreloader.height;if(m>l){e=e*(l/m);m=l;if(e>q){m=m*(q/e);e=q;}}else{if(e>q){m=m*(q/e);e=q;if(m>l){e=e*(l/m);m=l;}}}TB_WIDTH=m+30;TB_HEIGHT=e+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Zapri'><img src='"+ApplicationPath+"pic/i_remove.gif'/></div>");jQuery("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function p(){if(jQuery(document).unbind("click",p)){jQuery(document).unbind("click",p);}jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,h);return false;}jQuery("#TB_prev").click(p);}if(!(TB_NextHTML==="")){function o(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,h);return false;}jQuery("#TB_next").click(o);}document.onkeydown=function(r){if(r==null){keycode=event.keyCode;}else{keycode=r.which;}if(keycode==27){tb_remove();}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";o();}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";p();}}}}};tb_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(tb_remove);jQuery("#TB_window").css({display:"block"});};imgPreloader.src=b;}else{var a=b.replace(/^[^\?]+\??/,"");var d=tb_parseQuery(a);TB_WIDTH=(d.width*1)+30||630;TB_HEIGHT=(d.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");jQuery("#TB_iframeContent").remove();if(d.modal!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+j+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Zapri'><img src='"+ApplicationPath+"pic/i_remove.gif'/></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");}}else{if(jQuery("#TB_window").css("display")!="block"){if(d.modal!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+j+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='pic/i_remove.gif'/></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";jQuery("#TB_ajaxContent")[0].scrollTop=0;jQuery("#TB_ajaxWindowTitle").html(j);}}jQuery("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").append(jQuery("#"+d.inlineId).children());jQuery("#TB_window").unload(function(){jQuery("#"+d.inlineId).append(jQuery("#TB_ajaxContent").children());});tb_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if(jQuery.browser.safari){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}}else{jQuery("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();jQuery("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");jQuery("#TB_window").css({display:"block"});});}}}if(!d.modal){document.onkeyup=function(l){if(l==null){keycode=event.keyCode;}else{keycode=l.which;}if(keycode==27){tb_remove();}};}}catch(i){}}function tb_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}function tb_remove(){jQuery("#TB_imageOff").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").fadeOut("fast",function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove();});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","");}document.onkeydown="";document.onkeyup="";return false;}function tb_position(){jQuery("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){jQuery("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"});}}function tb_parseQuery(d){var e={};if(!d){return e;}var a=d.split(/[;&]/);for(var c=0;c<a.length;c++){var g=a[c].split("=");if(!g||g.length!=2){continue;}var b=unescape(g[0]);var f=unescape(g[1]);f=f.replace(/\+/g," ");e[b]=f;}return e;}function tb_getPageSize(){var c=document.documentElement;var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize;}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true;}}(function(a){a.fn.lightBox=function(p){p=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"/img/lightbox/lightbox-ico-loading.gif",imageBtnPrev:"/img/lightbox/lightbox-btn-prev.gif",imageBtnNext:"/img/lightbox/lightbox-btn-next.gif",imageBtnClose:"/img/lightbox/lightbox-btn-close.gif",imageBlank:"/img/lightbox/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},p);var i=this;function r(){o(this,i);return false;}function o(v,u){a("embed, object, select").css({visibility:"hidden"});c();p.imageArray.length=0;p.activeImage=0;if(u.length==1){p.imageArray.push(new Array(v.getAttribute("href"),v.getAttribute("title")));}else{for(var t=0;t<u.length;t++){p.imageArray.push(new Array(u[t].getAttribute("href"),u[t].getAttribute("title")));}}while(p.imageArray[p.activeImage][0]!=v.getAttribute("href")){p.activeImage++;}l();}function c(){a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+p.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+p.imageBtnClose+'"></a></div></div></div></div>');var t=f();a("#jquery-overlay").css({backgroundColor:p.overlayBgColor,opacity:p.overlayOpacity,width:t[0],height:t[1]}).fadeIn();var u=h();a("#jquery-lightbox").css({top:u[1]+(t[3]/10),left:u[0]}).show();a("#jquery-overlay,#jquery-lightbox").click(function(){b();});a("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){b();return false;});a(window).resize(function(){var v=f();a("#jquery-overlay").css({width:v[0],height:v[1]});var w=h();a("#jquery-lightbox").css({top:w[1]+(v[3]/10),left:w[0]});});}function l(){a("#lightbox-loading").show();if(p.fixedNavigation){a("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide();}else{a("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide();}var t=new Image();t.onload=function(){a("#lightbox-image").attr("src",p.imageArray[p.activeImage][0]);j(t.width,t.height);t.onload=function(){};};t.src=p.imageArray[p.activeImage][0];}function j(w,z){var t=a("#lightbox-container-image-box").width();var y=a("#lightbox-container-image-box").height();var x=(w+(p.containerBorderSize*2));var v=(z+(p.containerBorderSize*2));var u=t-x;var A=y-v;a("#lightbox-container-image-box").animate({width:x,height:v},p.containerResizeSpeed,function(){g();});if((u==0)&&(A==0)){if(a.browser.msie){n(250);}else{n(100);}}a("#lightbox-container-image-data-box").css({width:w});a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:z+(p.containerBorderSize*2)});}function g(){a("#lightbox-loading").hide();a("#lightbox-image").fadeIn(function(){k();s();});q();}function k(){a("#lightbox-container-image-data-box").slideDown("fast");a("#lightbox-image-details-caption").hide();if(p.imageArray[p.activeImage][1]){a("#lightbox-image-details-caption").html(p.imageArray[p.activeImage][1]).show();}if(p.imageArray.length>1){a("#lightbox-image-details-currentNumber").html(p.txtImage+" "+(p.activeImage+1)+" "+p.txtOf+" "+p.imageArray.length).show();}}function s(){a("#lightbox-nav").show();a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+p.imageBlank+") no-repeat"});if(p.activeImage!=0){if(p.fixedNavigation){a("#lightbox-nav-btnPrev").css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage-1;l();return false;});}else{a("#lightbox-nav-btnPrev").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"});},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"});}).show().bind("click",function(){p.activeImage=p.activeImage-1;l();return false;});}}if(p.activeImage!=(p.imageArray.length-1)){if(p.fixedNavigation){a("#lightbox-nav-btnNext").css({background:"url("+p.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage+1;l();return false;});}else{a("#lightbox-nav-btnNext").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnNext+") right 15% no-repeat"});},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"});}).show().bind("click",function(){p.activeImage=p.activeImage+1;l();return false;});}}m();}function m(){a(document).keydown(function(t){d(t);});}function e(){a(document).unbind();}function d(t){if(t==null){keycode=event.keyCode;escapeKey=27;}else{keycode=t.keyCode;escapeKey=t.DOM_VK_ESCAPE;}key=String.fromCharCode(keycode).toLowerCase();if((key==p.keyToClose)||(key=="x")||(keycode==escapeKey)){b();}if((key==p.keyToPrev)||(keycode==37)){if(p.activeImage!=0){p.activeImage=p.activeImage-1;l();e();}}if((key==p.keyToNext)||(keycode==39)){if(p.activeImage!=(p.imageArray.length-1)){p.activeImage=p.activeImage+1;l();e();}}}function q(){if((p.imageArray.length-1)>p.activeImage){objNext=new Image();objNext.src=p.imageArray[p.activeImage+1][0];}if(p.activeImage>0){objPrev=new Image();objPrev.src=p.imageArray[p.activeImage-1][0];}}function b(){a("#jquery-lightbox").remove();a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove();});a("embed, object, select").css({visibility:"visible"});}function f(){var v,t;if(window.innerHeight&&window.scrollMaxY){v=window.innerWidth+window.scrollMaxX;t=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){v=document.body.scrollWidth;t=document.body.scrollHeight;}else{v=document.body.offsetWidth;t=document.body.offsetHeight;}}var u,w;if(self.innerHeight){if(document.documentElement.clientWidth){u=document.documentElement.clientWidth;}else{u=self.innerWidth;}w=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){u=document.documentElement.clientWidth;w=document.documentElement.clientHeight;}else{if(document.body){u=document.body.clientWidth;w=document.body.clientHeight;}}}if(t<w){pageHeight=w;}else{pageHeight=t;}if(v<u){pageWidth=v;}else{pageWidth=u;}arrayPageSize=new Array(pageWidth,pageHeight,u,w);return arrayPageSize;}function h(){var u,t;if(self.pageYOffset){t=self.pageYOffset;u=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;u=document.documentElement.scrollLeft;}else{if(document.body){t=document.body.scrollTop;u=document.body.scrollLeft;}}}arrayPageScroll=new Array(u,t);return arrayPageScroll;}function n(v){var u=new Date();t=null;do{var t=new Date();}while(t-u<v);}return this.unbind("click").click(r);};})(jQuery);var headline_count;var headline_interval;var current_headline=0;var old_headline=-1;jQuery(document).ready(function(){if(jQuery("#oneliner_wrapper")){jQuery("#oneliner_wrapper").css("display","block");headline_count=jQuery("#news-slide-list li").size();jQuery("#news-slide-list li:eq(0)").css("left","600px");headline_rotate();headline_interval=setInterval(headline_rotate,10000);}});function headline_rotate(){current_headline=(old_headline+1)%headline_count;jQuery("#news-slide-list li:eq("+old_headline+")").animate({left:-600},5000,function(){jQuery(this).css("left","600px");});jQuery("#news-slide-list li:eq("+current_headline+")").animate({left:0},3000);old_headline=current_headline;}(function(e){var b={},k,m,o,j=e.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),a=false;e.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){e.tooltip.blocked=!e.tooltip.blocked;}};e.fn.extend({tooltip:function(p){p=e.extend({},e.tooltip.defaults,p);h(p);return this.each(function(){e.data(this,"tooltip",p);this.tOpacity=b.parent.css("opacity");this.tooltipText=this.title;e(this).removeAttr("title");this.alt="";}).mouseover(l).mouseout(f).click(f);},fixPNG:j?function(){return this.each(function(){var p=e(this).css("backgroundImage");if(p.match(/^url\(["']?(.*\.png)["']?\)$/i)){p=RegExp.$1;e(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+p+"')"}).each(function(){var q=e(this).css("position");if(q!="absolute"&&q!="relative"){e(this).css("position","relative");}});}});}:function(){return this;},unfixPNG:j?function(){return this.each(function(){e(this).css({filter:"",backgroundImage:""});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){e(this)[e(this).html()?"show":"hide"]();});},url:function(){return this.attr("href")||this.attr("src");}});function h(p){if(b.parent){return;}b.parent=e('<div id="'+p.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if(e.fn.bgiframe){b.parent.bgiframe();}b.title=e("h3",b.parent);b.body=e("div.body",b.parent);b.url=e("div.url",b.parent);}function c(p){return e.data(p,"tooltip");}function g(p){if(c(this).delay){o=setTimeout(n,c(this).delay);}else{n();}a=!!c(this).track;e(document.body).bind("mousemove",d);d(p);}function l(){if(e.tooltip.blocked||this==k||(!this.tooltipText&&!c(this).bodyHandler)){return;}k=this;m=this.tooltipText;if(c(this).bodyHandler){b.title.hide();var s=c(this).bodyHandler.call(this);if(c(this).showBody){var r=s.split(c(this).showBody);b.title.html(r.shift()).show();b.body.empty();for(var q=0,p;(p=r[q]);q++){if(q>0){b.body.append("<br/>");}b.body.append(p);}b.body.hideWhenEmpty();}else{if(s.nodeType||s.jquery){b.body.empty().append(s);}else{b.body.html(s);}}b.body.show();}else{if(c(this).showBody){var r=m.split(c(this).showBody);b.title.html(r.shift()).show();b.body.empty();for(var q=0,p;(p=r[q]);q++){if(q>0){b.body.append("<br/>");}b.body.append(p);}b.body.hideWhenEmpty();}else{b.title.html(m).show();b.body.hide();}}if(c(this).showURL&&e(this).url()){b.url.html(e(this).url().replace("http://","")).show();}else{b.url.hide();}b.parent.addClass(c(this).extraClass);if(c(this).fixPNG){b.parent.fixPNG();}g.apply(this,arguments);}function n(){o=null;if((!j||!e.fn.bgiframe)&&c(k).fade){if(b.parent.is(":animated")){b.parent.stop().show().fadeTo(c(k).fade,k.tOpacity);}else{b.parent.is(":visible")?b.parent.fadeTo(c(k).fade,k.tOpacity):b.parent.fadeIn(c(k).fade);}}else{b.parent.show();}d();}function d(s){if(e.tooltip.blocked){return;}if(s&&s.target.tagName=="OPTION"){return;}if(!a&&b.parent.is(":visible")){e(document.body).unbind("mousemove",d);}if(k==null){e(document.body).unbind("mousemove",d);return;}b.parent.removeClass("viewport-right").removeClass("viewport-bottom");var u=b.parent[0].offsetLeft;var t=b.parent[0].offsetTop;if(s){u=s.pageX+c(k).left;t=s.pageY+c(k).top;var q="auto";if(c(k).positionLeft){q=e(window).width()-u;u="auto";}b.parent.css({left:u,right:q,top:t});}var p=i(),r=b.parent[0];if(p.x+p.cx<r.offsetLeft+r.offsetWidth){u-=r.offsetWidth+20+c(k).left;b.parent.css({left:u+"px"}).addClass("viewport-right");}if(p.y+p.cy<r.offsetTop+r.offsetHeight){t-=r.offsetHeight+20+c(k).top;b.parent.css({top:t+"px"}).addClass("viewport-bottom");}}function i(){return{x:e(window).scrollLeft(),y:e(window).scrollTop(),cx:e(window).width(),cy:e(window).height()};}function f(r){if(e.tooltip.blocked){return;}if(o){clearTimeout(o);}k=null;var q=c(this);function p(){b.parent.removeClass(q.extraClass).hide().css("opacity","");}if((!j||!e.fn.bgiframe)&&q.fade){if(b.parent.is(":animated")){b.parent.stop().fadeTo(q.fade,0,p);}else{b.parent.stop().fadeOut(q.fade,p);}}else{p();}if(c(this).fixPNG){b.parent.unfixPNG();}}})(jQuery);jQuery(document).ready(function(){jQuery(".jtooltip").tooltip({delay:0,showURL:false,bodyHandler:function(){return jQuery(this).attr("rel");},showBody:"|||"});});