
var overlay_fx;function showBox(id,show)
{if(show!=undefined&&show==false)
{$('overlay').removeEvent('click');overlay_fx.start(0);$(id).fade('out');}
else
{$('overlay').addEvent('click',function(e){showBox(id,false);});overlay_fx.start(0.7);$(id).fade('in');}}
tinyMCE.init({mode:'exact',entity_encoding: "raw",skin:'o2k7',theme:'advanced',elements:'page_content,page_content2,page_add_content,setting_contact',theme_advanced_path:false,theme_advanced_toolbar_align:"left",theme_advanced_toolbar_location:"top",extended_valid_elements:'a[name|href|target|title|onclick],img[class|src|alt|title|hspace|vspace|width|height|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'});window.addEvent('domready',function(){$$('.foto img').each(function(el){el.addEvent('click',function(e){var url=el.src;url=url.replace("/thumb/","/");$('popup_foto').setAttribute('src',url)
showBox('foto_popup');});});$$('.close_window').each(function(el){el.addEvent('click',function(e){new Event(e).stop();showBox(el.parentNode,false);});});$each(['contact_form','foto_popup','login_form','menu_form','page_form','page_form_large','page_add_form'],function(id){if($chk($(id)))
$(id).fade('hide').setStyle('display','block');});overlay_fx=new Fx.Tween($('overlay'),{link:'cancel',onStart:Events.prototype.clearChain,duration:300,property:'opacity'}).set(0);$('overlay').setStyles({width:window.getScrollSize().x,height:window.getScrollSize().y,'display':'block'});if($chk($('vraag')))
{var el=$('vraag');var text="Typ hier uw vraag";$('vraag').addEvent('focus',function(e){if(el.value==text){el.value="";}});$('vraag').addEvent('blur',function(e){if(el.value==""){el.value=text;}});}
if($chk($('send-button')))
{$('send-button').addEvent('click',function(e){new Event(e).stop();$('contact-form').submit();});}
if($chk($('add_menu_cancel')))
{$('add_menu_cancel').addEvent('click',function(e){new Event(e).stop();showBox('menu_form',false);});}
if($chk($('contact_cancel')))
{$('contact_cancel').addEvent('click',function(e){new Event(e).stop();showBox('contact_form',false);});}
if($chk($('contact_link')))
{$('contact_link').addEvent('click',function(e){new Event(e).stop();showBox('contact_form');});}
if($chk($('login_cancel')))
{$('login_cancel').addEvent('click',function(e){new Event(e).stop();showBox('login_form',false);});}
if($chk($('login_link')))
{$('login_link').addEvent('click',function(e){new Event(e).stop();showBox('login_form');});}
if($chk($('menu_cancel')))
{$('menu_cancel').addEvent('click',function(e){new Event(e).stop();showBox('menu_form',false);});}
if($chk($('menu_link')))
{$('menu_link').addEvent('click',function(e){new Event(e).stop();showBox('menu_form');});}
if($chk($('page_cancel')))
{$('page_cancel').addEvent('click',function(e){new Event(e).stop();showBox('page_form',false);});}
if($chk($('page_large_link')))
{$('page_large_link').addEvent('click',function(e){new Event(e).stop();showBox('page_form_large');});}
if($chk($('page_link')))
{$('page_link').addEvent('click',function(e){new Event(e).stop();showBox('page_form');});}
if($chk($('page_add_cancel')))
{$('page_add_cancel').addEvent('click',function(e){new Event(e).stop();showBox('page_add_form',false);});}
if($chk($('page_add_link')))
{$('page_add_link').addEvent('click',function(e){new Event(e).stop();showBox('page_add_form');});}});