jQuery('.timetable .dates .first span a').click(function(){var $this=jQuery(this);var text=$this.text();var newText=$this.attr('alternate');$this.attr('alternate',text).text(newText).closest('.dates').find('.more').slideToggle();});function makeButton(){jQuery('.jobreactionblock a, .button-container input, .button-container a, .buttons input, .quickorder input, .checkout a, .button-container ul li a, .categorybutton, .mailagentblock a, .clearbasket a, .basketaddblock a, .button-container .button, .rssbuttonholder a, .htmlblock div.pdf a, .gallerygoback a, .paging .next, .paging .previous, .pages .next, .pages .previous, .options a').not(jQuery('.addperson a, #header .button-container input, .mailafriendblock a, .searchresultsblock ul li a, .incompany, .moreinfo, .signup')).each(function(){var button=this;if(button.type!='hidden'){jQuery(button).wrap('<span class="candywrapper"></span>');}else{jQuery(button).css('display','none');}});}
function mouseOver(){jQuery('.candywrapper a, .candywrapper input, .displayjob .jobreactionblock .candywrapper a').not(jQuery('.signup, .finish, .previousWrapper .previous, .nextWrapper .next, ')).mouseover(function(){var disabled=this.getAttribute('disabled');if(!disabled){jQuery(this).addClass('linkhover')}}).mouseout(function(){jQuery(this).removeClass('linkhover')});jQuery('.candywrapper, .displayjob .jobreactionblock .candywrapper').not(jQuery('.signupWrapper, .nextWrapper, .previousWrapper, .finishWrapper')).mouseover(function(){var disabled=this.firstChild!=null?this.firstChild.getAttribute('disabled'):false;if(!disabled){jQuery(this).addClass('hover')}}).mouseout(function(){jQuery(this).removeClass('hover')});}
function changeForm()
{jQuery('.surveycontainer .q_multipleresponse').each(function()
{var t=this;var newDiv=jQuery('<div class="checkboxes">');var spanText=jQuery('.question-text',t);var getTables=jQuery('table',t);var getSelect=jQuery('select',t);var breakIt=jQuery('br',t);var element=new Array;var type=new Array;var aantalChilds;if((getTables.length+getSelect.length)==0)
{breakIt.remove();aantalChilds=t.childNodes.length;for(var x=0;x<aantalChilds;x++)
{if(t.childNodes[x].tagName=='INPUT')
{element[x]=t.childNodes[x];type[x]=t.childNodes[x].tagName;}
if(t.childNodes[x].tagName=="LABEL")
{element[x]=t.childNodes[x];type[x]=t.childNodes[x].tagName;}}
for(var x=0;x<aantalChilds;x++)
{if(element[x]=='object');{newDiv.append(element[x]);}
if(type[x]=='LABEL')
{newDiv.append(jQuery('<br>'));}}
spanText.after(newDiv);}});}
function giveClass(){jQuery('.paging, .pages').each(function(){var t=jQuery(this);var anchor=jQuery('a',t);if(anchor.hasClass('previous')){jQuery('.paging .candywrapper:eq(0), .pages .candywrapper:eq(0)').addClass('nextPageWrapper');}});}
function selectedTab(){jQuery('#more ul li.lc:parent').each(function(){var t=jQuery(this);if(t.hasClass('ui-tabs-selected')){jQuery('#more ul li.ui-tabs-selected').addClass('lcselected');}});}
function OddEven(){jQuery('.courselistblock, .searchresultsblock, .articlelistblock').not(jQuery('#course .courselistblock')).each(function(){var block=this;var counter=0;jQuery('li',block).not(jQuery('li li',block)).each(function(){var listItem=jQuery(this);counter++;if(counter%2==0){listItem.addClass('odd');}});});}
function changeFormButtons(){jQuery('.button-container a').each(function(){var t=jQuery(this);if(t.hasClass('next')){jQuery('a.next').parent().addClass('nextWrapper');}
if(t.hasClass('previous')){jQuery('a.previous').parent().addClass('previousWrapper');}
if(t.hasClass('finish')){jQuery('a.finish').parent().addClass('finishWrapper');}
if(t.hasClass('signup')){jQuery('a.signup').parent().addClass('signupWrapper');}});}
function moveBlock()
{jQuery('#chapter_one').each(function()
{var t=jQuery(this);var overview=jQuery('.registrationblock .overview',t);var menu=jQuery('#remain .blocks-blockholder',t);menu.append(overview);});}
function removeLabel(){jQuery('#kmp').each(function()
{jQuery('#kmp .surveycontainer .input-text').attr('value','');jQuery('#kmp .surveycontainer .input-text').focus(function(){jQuery('#kmp .surveycontainer label').hide();});jQuery('#kmp .surveycontainer .input-text').blur(function(){if(jQuery('#kmp .surveycontainer .input-text').attr('value').length<=0){jQuery('#kmp .surveycontainer label').show();}});});jQuery('#course').each(function()
{jQuery('#course .searchblock .input-text').attr('value','');jQuery('#course .searchblock .input-text').focus(function(){jQuery('#course .searchblock label').hide();});jQuery('#course .searchblock .input-text').blur(function(){if(jQuery('#course .searchblock .input-text').attr('value').length<=0){jQuery('#course .searchblock label').show();}});});jQuery('#header').each(function()
{jQuery('#header .searchblock .input-text').attr('value','');jQuery('#header .searchblock .input-text').focus(function(){jQuery('#header .searchblock label').hide();});jQuery('#header .searchblock .input-text').blur(function(){if(jQuery('#header .searchblock .input-text').attr('value').length<=0){jQuery('#header .searchblock label').show();}});});jQuery('#left').each(function()
{jQuery('#left .searchblock .input-text').attr('value','');jQuery('#left .searchblock .input-text').focus(function(){jQuery('#left .searchblock label').hide();});jQuery('#left .searchblock .input-text').blur(function(){if(jQuery('#left .searchblock .input-text').attr('value').length<=0){jQuery('#left .searchblock label').show();}});});jQuery('#brochure').each(function()
{jQuery('#brochure .searchblock .input-text').attr('value','');jQuery('#brochure .searchblock .input-text').focus(function(){jQuery('#brochure .searchblock label').hide();});jQuery('#brochure .searchblock .input-text').blur(function(){if(jQuery('#brochure .searchblock .input-text').attr('value').length<=0){jQuery('#brochure .searchblock label').show();}});});}
function expandLi()
{jQuery('#faq .articlelistblock ul li').each(function()
{var t=jQuery(this);var h3=jQuery('h3',t);var anchor=jQuery('h3 a',t).removeAttr('href');var info=jQuery('.info',t);info.before(h3);jQuery(h3).click(function(){if(info.is(':hidden')==true){info.show();h3.parent().addClass('openLi');}
else{info.hide();h3.parent().removeClass('openLi');}});});}
function expandCourseLi()
{jQuery('.course #columnRight .courselistblock ul li').each(function()
{var t=jQuery(this);var h3=jQuery('h3',t);var anchor=jQuery('h3 a',t).removeAttr('href');var info=jQuery('.info_wrapper',t);info.before(h3);jQuery(h3).click(function(){if(info.is(':hidden')==true){info.show();h3.parent().addClass('openLi');}
else{info.hide();h3.parent().removeClass('openLi');}});});}
function hideBlocks(){if(jQuery('.mm_wysiwyg_container').length==0){jQuery('#kmp, #brochure, #course, #left, #contact, #chapter_three').each(function(){var t=this;var aantal=jQuery('.block-output',t).length;if(aantal==0){jQuery(t).hide();}});}}
function moveArticleHeader()
{jQuery('#select_wrapper .articlelistblock li').each(function()
{var li=jQuery(this);var h3=jQuery('h3',li);var thumb=jQuery('.articlelist_thumbnail',li);h3.after(thumb);});}
function showTooltip(){jQuery('#contact .htmlblock, #kmp .htmlblock').each(function(){var t=jQuery(this);var anchor=jQuery('a',t);anchor.bind("mouseenter mouseleave",function(e)
{jQuery('#contact .htmlblock div, #kmp .htmlblock div').toggleClass('tooltip');});});}
function toggleList(){jQuery('.home #columnRight .courselistblock ul .groupname').each(function(){var t=jQuery(this);var head=jQuery('h3',t);var ul=jQuery('ul',t).hide();head.click(function(){ul.toggle();});});}
function sitePath(){jQuery('.sitepathblock ul li.lc').each(function(){var t=jQuery(this);if(t.prev().hasClass('fc')){jQuery('.sitepathblock ul li.lc').addClass('remove');jQuery('.sitepathblock ul li.fc').addClass('first');}});}
function createDropdown(){jQuery('#course .courselistblock').each(function(){var block=this;var select="<div class='navselect'><select onchange=\"if (this.value) {this.options[this.selectedIndex].target == \'_blank\' ? window.open(this.value) : window.location.href=this.value}; this.selectedIndex = 0;\" class=\'input-select\'>";jQuery('ul li.groupname',block).not(jQuery('ul li ul')).each(function(){var item=this;var level=0;var head=jQuery('h3 span',item);if(head.length>0){var headName=head[0].innerHTML;select=select+"<optgroup label="+headName+" />";}
jQuery('ul li',item).each(function(){var liElement=this;jQuery('h3 a',liElement).each(function(){var anchor=this;select=select+"<option value='"+anchor.href+"' target=''>"+anchor.innerHTML+"</option>";});});});select=select+'</select></div>';jQuery(block).append(jQuery(select));});}
function moveItems(){jQuery('#columnLeft').each(function(){var t=this;var addThis=jQuery('.addthis_button',t);var print=jQuery('.print',t);var mailafriend=jQuery('.mailafriendblock',t);var info=jQuery('.coursedisplayblock .extrainfo .options',t);info.append(addThis);info.append(print);info.append(mailafriend);});}
function placeSpan(){jQuery("h2, h1, #select_wrapper h3 a").each(function(){var t=jQuery(this);var cufon=jQuery(".cufon cufoncanvas",t);cufon.wrap('<span class="wrapper"></span>')});}
sitePath();changeForm();makeButton();mouseOver();giveClass();selectedTab();OddEven();removeLabel();hideBlocks();showTooltip();changeFormButtons();expandLi();expandCourseLi();moveArticleHeader();toggleList();createDropdown();moveItems();placeSpan();jQuery('.registrationblock .steps li:eq(0) span').addClass('fc');jQuery('.registrationblock .steps li:eq(1) span').addClass('sc');jQuery('.registrationblock .steps li:eq(2) span').addClass('tc');jQuery('.registrationblock .steps li:eq(3) span').addClass('lc');moveBlock();jQuery('.sitepathblock ul li.lc').prev().addClass('beforeLC');jQuery('#contact .candywrapper input[value="Wissen"], #kmp .candywrapper input[value="Wissen"]').parent().addClass('hide');jQuery('.tip').cluetip({splitTitle:'|',showTitle:false,dropShadow:false});Cufon.replace('h1, h2');Cufon.replace('#select_wrapper h3 a',{hover:true});Cufon.now();
