function changeLaguage(language) {	
	if (language == 'en') { 
		$('#switch-ned').attr('className', 'nl');
		$('#switch-eng').attr('className', 'selected');
		$('#container').attr('className', 'eng');
		$('#temp-cover').attr('className', 'eng');

		
		$('input[name=language]').attr('value', 'english');
	} else {
		$('#switch-ned').attr('className', 'selected');
		$('#switch-eng').attr('className', 'en');
		$('#container').attr('className', 'ned');
		$('#temp-cover').attr('className', 'ned');
		$('input[name=language]').attr('value', 'dutch');
	}
	
	Cufon.refresh();
}

//set the chosen identity (professional, partygoer) and submit
function passIdentity(obj) {
    if (true || $(obj).attr("title") == "professional") {
        var identity = $(obj).siblings("input");
        identity.attr("checked",true);
       
        $(identity).parents("form").submit();
    } else {
        $("#temp-cover").css("display","block");
    }
    
}

function showExplenation() {
	$("div.explanation").removeClass("hide");
}

function closeExplanation(){
	$('div.explanation').addClass('hide')
}

function closeNotification(){
	$("#temp-cover").hide();
}

jQuery(document).ready(function() {

	if( window.location.href.match(/en(\/){0,1}$/i)){
		changeLaguage('en');
	} 
	
	$("form input[class=check]").css("display","none");
	Cufon.now();
	$(window).bind("unload",function(){
		$("canvas, span.cufon").remove();
	});
});
