/* GOOGLE MAP  */

function initialize() {
    var latlng = new google.maps.LatLng(51.510394,-0.122029);
    var myOptions = {
      zoom: 16,
      center: latlng,
	  mapTypeControl: false,
	  streetViewControl: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
	
	var image = 'images/gmap_marker.png';
	var myLatLng = new google.maps.LatLng(51.510394,-0.122029);
  	var beachMarker = new google.maps.Marker({
      position: myLatLng,
      map: map,
      icon: image})
  	} 
	


$(document).ready(function() {
	
	$("a[href='#top']").click(function() {
	  $("html, body").animate({ scrollTop: 0 }, "slow");
	  return false;
	});
	
	$("nav a").click(function() {
	$("html, body").animate({
	scrollTop: $($(this).attr("href")).offset().top + "px"
	}, {
	duration: 500,
	easing: "swing"
	});
	return false;
	});
	
	
	
	/* DROP MENU */
	$(function(){
	var menu = $('#menu'),
		pos = menu.offset();

		$(window).scroll(function(){
			if($(this).scrollTop() > pos.top+menu.height() && menu.hasClass('default')){
				menu.fadeOut('fast', function(){
					$(this).removeClass('default').addClass('fixed').fadeIn('fast');
				});
			} else if($(this).scrollTop() <= pos.top && menu.hasClass('fixed')){
				menu.fadeOut('fast', function(){
					$(this).removeClass('fixed').addClass('default').fadeIn('fast');
				});
			}
		});

});


$('#client-info').append('<img src="images/loadinfo.jpg">');
$('#client-list a').click(function() {
	var content = $(this).next('.swap-info').html();
	$('#client-info').fadeOut('fast', function() {
		$(this).html(content).fadeIn('fast');	
	});
	return false;
});

	
})
