function initializeMap() {
	myLatlng = new google.maps.LatLng(51.045569, 3.7137495);
	centerLatLng = new google.maps.LatLng(51.045569, 3.7137495);
	
	var mapConfig = {
		zoom: 15,
		center: centerLatLng,
		mapTypeControl: false,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};

	var map = new google.maps.Map(document.getElementById("map"), mapConfig);

	marker = new google.maps.Marker({ map: map,
									  title: 'Groot Brittanniëlaan 12, Gent',
								      position: myLatlng
									});
	
}

function init() {
	$("#nav span").css("opacity", "0").before("<br />"); 

	$("#nav li")
			.hover(function(){
				$(this).find("span").animate({ "opacity" : "1"}, { queue: false });
			})
			.mouseleave(function(){
				$(this).find("span").animate({ "opacity" : "0"}, { queue: false });
			})
			
	$("#contact-form.nojquery").removeClass("nojquery");
			
	$("form.jqtransform").jqTransform();
	
	$(".gallery a").fancybox();
	
	$("#accordion").accordion({ header: 'h4',
								  autoHeight: false });
	
	if($('#map').size() > 0) initializeMap();
	
	$('#tabs').bind('tabsshow', function(event, ui) {
	    if (ui.panel.id == "map") {
	    	//forced to reinitialize because of a display: none bug in google
	    	initializeMap();
	    }
	});
	
	$('#tabs > ul').css('display', 'block');
	
	$("#tabs").tabs();

	$('#back-to-top').localScroll();
	
	//initializeMap();
}

$(document).ready( init );
