if(typeof(tinyMCE) != 'undefined') {
tinyMCE.init({
  mode: 'textareas',
  editor_selector: 'wysiwyg',
  theme: 'advanced',
  theme_advanced_buttons1 : "bold,italic,|,bullist,numlist,|,link,unlink,|,formatselect,|,code",
  theme_advanced_buttons2 : "",
  theme_advanced_buttons3 : "",
  theme_advanced_blockformats : "p,address,h2,h3,h4,h5,h6",
  extended_valid_elements : "a[class|rel|href|title],img[class|src|alt|title|width|height],span[class],strong,em",
//  auto_cleanup_word: true,
  verify_html: true,
  appy_source_formatting: true,
  cleanup: true,
  cleanup_on_startup: true,
  convert_fonts_to_spans: true,
  convert_newlines_to_brs: false,
  doctype: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
  encoding: 'xml',
  entity_encoding: 'raw',
  fix_list_elements: true,
  fix_table_elements: true,
  fix_nesting: true, // might be slow
  force_p_newlines: true,
  forced_root_block: 'p',
  remove_trailing_nbsp: true,
  paste_auto_cleanup_on_paste: true,
//  language: 'nl',
  plugins: 'paste',
  paste_use_dialog: false,
  paste_create_paragraphs: true,
  paste_auto_cleanup_on_paste: true,
  paste_convert_middot_lists: true,
  paste_convert_headers_to_strong: false
});
}

$(function() {
 $('a.lightbox').lightBox({
  fixedNavigation: true,
  imageLoading: '/images/lightbox-ico-loading.gif',
  imageBtnClose: '/images/lightbox-btn-close.gif',
  imageBtnPrev: '/images/lightbox-btn-prev.gif',
  imageBtnNext: '/images/lightbox-btn-next.gif'
 });
 
 $('a[rel=external]').attr('target', '_blank');

 if(document.getElementById('map')) { google_onload(); }
});
