window.addEvent('domready',function(){if(window.ie6!=true){var myTips=new Tips($$('.tooltip'),{fixed:false,offsets:{'x':5,'y':15},maxTitleChars:150,initialize:function(){this.fx=new Fx.Style(this.toolTip,'opacity',{duration:200,wait:100}).set(0)},onShow:function(toolTip){this.fx.start(0.8)},onHide:function(toolTip){this.fx.start(0)}})}new SmoothScroll({duration:600,fps:100,transition:Fx.Transitions.cubicInOut});$('themes').setStyle('display','block');$('theme_dark').addEvent('mouseup',function(){toggle_theme('dark')});$('theme_light').addEvent('mouseup',function(){toggle_theme('light')});var screenport_width=window.getWidth();var screenport_height=window.getHeight();if(screenport_width<970){var width='970'}else{}});function active(){Cookie.set('input','active',{duration:false,path:'/werk/'})}function outside(){Cookie.set('input','outside',{duration:false,path:'/werk/'})}document.addEvent('keydown',function(e){var input_state=Cookie.get('input');if(input_state==false||input_state=='outside'){var e=new Event(e);if(e.key=='l'){toggle_theme('key')}if(e.key=='left'){prev_photo()}if(e.key=='right'){next_photo()}}});function toggle_theme(theme_action){var theme=Cookie.get('theme');if(theme_action=='dark'){$E('body').addClass('dark');$('theme_dark').addClass('active');$('theme_light').removeClass('active');Cookie.set('theme','dark',{duration:false,path:'/'})}else if(theme_action=='light'){$E('body').removeClass('dark');$('theme_dark').removeClass('active');$('theme_light').addClass('active');Cookie.set('theme','light',{duration:false,path:'/'})}else if(theme_action=='key'&&theme=='dark'){$E('body').removeClass('dark');$('theme_dark').removeClass('active');$('theme_light').addClass('active');Cookie.set('theme','light',{duration:false,path:'/'})}else if(theme_action=='key'&&theme=='light'){$E('body').addClass('dark');$('theme_dark').addClass('active');$('theme_light').removeClass('active');Cookie.set('theme','dark',{duration:false,path:'/'})}else if(theme=='dark'){$E('body').addClass('dark');$('theme_dark').addClass('active');$('theme_light').removeClass('active');Cookie.set('theme','dark',{duration:false,path:'/'})}else if(theme=='light'){$E('body').removeClass('dark');$('theme_dark').removeClass('active');$('theme_light').addClass('active');Cookie.set('theme','light',{duration:false,path:'/'})}else{$('theme_light').addClass('active');Cookie.set('theme','light',{duration:false,path:'/'})}}