	// google maps code
	function initialize() {
		var latlng = new google.maps.LatLng(51.022462, 3.993564);
		var myOptions = {
			zoom: 16,
			center: latlng,
			mapTypeId: google.maps.MapTypeId.ROADMAP
		};		
		var map = new google.maps.Map(document.getElementById("map_canvas"),
		myOptions);
		var marker = new google.maps.Marker({
			position: latlng, 
			map: map, 
			title:"Bo&Co",
			animation: google.maps.Animation.DROP
		});			
	}

	function scrollUp(){
		$('.scrollable').stop().scrollTo( '-=100', 500 ); 
	}

	function scrollDown(){
		$('.scrollable').stop().scrollTo( '+=100', 500 ); 
	}

	$(document).ready(function () {		
		// init lightboxes
		$("a[rel^='googleMap']").prettyPhoto({
			social_tools: false,
			show_title: false,
			allow_resize: false,
			deeplinking: false,
			custom_markup: '<div id="map_canvas" style="width:640px; height:480px"></div>',
			changepicturecallback: function(){ initialize(); }
		});
		
		$("a[rel^='youtube']").prettyPhoto({
			social_tools: false,
			show_title: false,
			allow_resize: false,
			deeplinking: false
		});
		
		var $panels = $('#container #pages > div');
		var $container = $('#container #pages');

		// if false, we'll float all the panels left and fix the width 
		// of the container
		var horizontal = true;

		// float the panels left if we're going horizontal
		if (horizontal) {
			$panels.css({
				'float' : 'left',
				'position' : 'relative' // IE fix to ensure overflow is hidden
			});

			// calculate a new width for the container (so it holds all panels)
			$container.css('width', $panels[0].offsetWidth * $panels.length);
		}

		// collect the scroll object, at the same time apply the hidden overflow
		// to remove the default scrollbars that will appear
		var $scroll = $('#container #content-wrapper').css('overflow', 'hidden');

		var scrollOptions = {
			target: $scroll, // the element that has the overflow
			easing: 'swing',
			// can be a selector which will be relative to the target
			items: $panels,

			navigation: '#navigation a',


			// allow the scroll effect to run both directions
			axis: 'xy',

			// duration of the sliding effect
			duration: 1500


		};

		// now apply localScroll to hook any other arbitrary links to trigger 
		// the effect
		$.localScroll(scrollOptions);

		// finally, if the URL has a hash, move the slider in to position, 
		// setting the duration to 1 because I don't want it to scroll in the
		// very first page load.  We don't always need this, but it ensures
		// the positioning is absolutely spot on when the pages loads.
		scrollOptions.duration = 1;
		$.localScroll.hash(scrollOptions);

		// scrolling options for gallery/showroom
		$('#gallerywrapper').serialScroll({
			items:'li',
			prev:'#showroom .button#prev',
			next:'#showroom .button#next',
			duration:1200,
			force:true,
			stop:true,
			axis:'y',
			lock:false,
			cycle:false, //don't pull back once you reach the end
			easing:'swing', //use this easing equation for a funny effect
			jump: true //click on the images to scroll to them
		});
		
		$("#showroom .button").hover(
			function() {
				$(this).find('.arrow').fadeIn();
			},
			function() {
				$(this).find('.arrow').fadeOut();
		});		
		
		// scrolling options for text
		$('.text .up').click(function(e){
			e.preventDefault();
			scrollUp();
		});		
		// scrolling options for text
		$('.text .down').click(function(e){
			e.preventDefault();
			scrollDown();
		});

		// scroll with mousewheel too
		$('.scrollable').bind('mousewheel', function(event, delta) {
			delta > 0 ? scrollUp() : scrollDown();
		});

		$("#player").jPlayer({ // Instantiate the plugin  
			ready: function () { // Executed when the plugin is ready  
				this.element.jPlayer("setFile", "/assets/boenco.mp3").jPlayer("play"); // Auto-play the audio  
			},
			customCssIds: true,
			swfPath: '/assets',
			volume: 75
		});  

		$("#player").jPlayer("cssId", "play", "stop"); // Associates play  
		$("#player").jPlayer("cssId", "stop", "play"); // Associates stop

		$("#player").jPlayer("onSoundComplete", function() { // Executed when the mp3 ends  
			this.element.jPlayer("play"); // Auto-repeat  
		});
		
		// show/hide play/stop buttons
		$('.mp3button').click(function(e){
			if ($(this).attr('id') == 'play') {
				$('#stop').show().css("display", "block");
				$('#play').hide();
			} else {
				$('#play').show();//;
				$('#stop').hide();				
			}
			e.preventDefault();
		});
		
		// show/hide play/stop buttons
		$("a[rel^='youtube']").click(function(e){
			$("#player").jPlayer("stop");
			$('#stop').show().css("display", "block");
			$('#play').hide();			
		});		
	});
