			$(document).ready(function(){
				$('#header').flash(
					{ 	src: '/flash/flashheader.swf',
						width: 978,
						height: 210, 
						wmode:"transparent",
						allowScriptAccess:"sameDomain",
						flashvars: { xmlPath: '/flash/xmloutput.php?type='+type+'&id='+ID }
					},
					{ version: 8 }
				);
    			$("#searchquery").focus(function () {
					$('#searchquery').addClass("activated");
					if ($('#searchquery').val() == "geef een zoekterm") $('#searchquery').val("");
				});
    			$("#searchquery").blur(function () {			
					if ($('#searchquery').val() == "") {
						$('#searchquery').val("geef een zoekterm");
						$('#searchquery').removeClass("activated");						
					}
				})
				ddsmoothmenu.init({
					mainmenuid: "menu",
					orientation: 'h',
					classname: 'ddsmoothmenu',
					contentsource: "markup"
				})
				$("a[rel='external']").click(function(){
				    this.target = "_blank";
				});
				$(function() {
					$('.popup').click(function(e) {
						e.preventDefault();
						var $this = $(this);
						var horizontalPadding = 30;
						var verticalPadding = 30;
						$('<iframe id="externalSite" class="externalSite" frameborder = "0" src="' + this.href + '" />').dialog({
							title: ($this.attr('title')) ? $this.attr('title') : 'Popup window',
							autoOpen: true,
							width: 520,
							height: 360,
							modal: true,
							resizable: true,
							autoResize: true,
							overlay: {
								opacity: 0.5,
								background: "black"
							},
							close: function() { location.reload()}
						}).width(520 - horizontalPadding).height(360 - verticalPadding);            
					});
				});
				$("a.zoom").fancybox();
$("a#inline").fancybox({
		'hideOnContentClick': true
});
				$(".datepicker").datepicker({dateFormat: 'dd-mm-yy', minDate: 0, maxDate: '+1Y',regional : 'nl'});	
				$("#twitterblock").tweet({
				  join_text: "auto",
				  username: "clubactif",
				  avatar_size: 0,
				  count: 3,
				  loading_text: "berichten worden geladen..."
				});
				$('.weerhidden').hide();
				$('#weather').change(function() {
					$('.weer').hide();
					$('#weer-' + $(this).val()).show();
				});
				//homepage
				$('.mouseoverlink').mouseover(function() {
					var linkproperties;
					linkproperties = $(this).attr('rel').split('-');
					if (linkproperties[1]== "0") {
						color = 'green';
					} else if (linkproperties[1] == "1") {
						color = 'yellow';
					} else if (linkproperties[1] == "2") {
						color = 'blue';
					} else if (linkproperties[1] == "3") {
						color = 'black';
					} else { 
						color = '';
					}
					$('#block'+linkproperties[1]+'desc').load("/catinfo.php", {'id': linkproperties[0], 'color' : color });
				});
				$('.mouseoverlink').mouseout(function() {
					var linkproperties;
					linkproperties = $(this).attr('rel').split('-');
					if (linkproperties[1]== "0") {
						color = 'green';
					} else if (linkproperties[1] == "1") {
						color = 'yellow';
					} else if (linkproperties[1] == "2") {
						color = 'blue';
					} else if (linkproperties[1] == "3") {
						color = 'black';
					} else { 
						color = '';
					}
					$('#block'+linkproperties[1]+'desc').load("/catinfo.php", {'id': 0, 'color' : color });
				});
				if ($('#uploadinput').length) {
					$('#uploadinput').uploadify({
						'uploader': '/flash/uploadify.swf',
						'script': '/uploaduserpictures.php',
						'folder': '/userpictures/',
						'cancelImg': '/images/cancel.png',
						'fileDesc': 'Foto bestanden',
						'fileExt': '*.jpg;*.jpeg',
						'multi': true,
						'displayData': 'speed',
						'simUploadLimit' : '5',
						'queueID' : 'fileQueue',
						'scriptData' : {'fotoalbumID': fotoalbumID},
						'auto': true
					});				
				}
			});	
				function setBook() {
					$('#akkoordgaan').css("display", "block");
					$('#aantalpersonen').css("display", "inline");
					$('#periode').css("display", "inline")
					$('#plaats').css("display", "inline")
					$('#postcode').css("display", "inline")
					$('#adres').css("display", "inline")
					$('#telefoonnummer').css("display", "inline")
				}
				function setInfo() {
					$('#akkoordgaan').css("display", "none");
					$('#aantalpersonen').css("display", "none");
					$('#periode').css("display", "none");
					$('#plaats').css("display", "none");
					$('#postcode').css("display", "none");
					$('#adres').css("display", "none");
					$('#telefoonnummer').css("display", "none");
					$('#street').css("border", "1px solid #a4a4a4");
					$('#housenumber').css("border", "1px solid #a4a4a4");
					$('#postalcode1').css("border", "1px solid #a4a4a4");
					$('#postalcode2').css("border", "1px solid #a4a4a4");
					$('#city').css("border", "1px solid #a4a4a4");
					$('#nopersons').css("border", "1px solid #a4a4a4");
					$('#period').css("border", "1px solid #a4a4a4");
					$('#telephonenumber').css("border", "1px solid #a4a4a4");
				}				
			