// Menu "lava lamp"
$(document).ready(function() {
	$('#nav').lavaLamp({fx: 'swing', speed: 333});
});

// Effet d'apparition du menu
$(document).ready(function() {
	$('#nav').css({
		opacity: 0,
		top: -20
	}).animate({
		opacity: 0.70,
		top: 0
	}, 1000);
});

// Effet d'apparition du logo
$(document).ready(function() {
	$('#logo').css({
		opacity: 0,
		top: 223
	}).animate({
		opacity: 0.8,
		top: 138
	}, 1000);
});

// Fancybox
$(document).ready(function() {
	$("a.lightbox").fancybox();
});

// Animation intro
if(document.getElementById('anim')) {
	swfobject.embedSWF("anim.swf", "anim", "950", "700", "6.0.0");
}

// Google Map
$(document).ready(function() {
	if($('body#contact').length > 0) {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl()); // Type de carte (satellite / plan / mixte)
			var coord_p = new GLatLng(48.90648,8.047228);
			var coord_strasbourg = new GLatLng(48.57362000, 7.75473000);
			map.setCenter(coord_p, 10);     
			var icon = new GIcon();
			icon.image = "./img/icone-gmaps.png";
			icon.iconSize=new GSize(20,20);
			icon.iconAnchor=new GPoint(16,16);
			var marker_p = new GMarker(coord_p, {icon:icon, title:"Cliquez pour voir les coordonnées"});
			map.addOverlay(marker_p);
			GEvent.addListener(marker_p, "click", function() {
				map.openInfoWindowHtml(coord_p,'<div align="center" style="height: 90px; color: #000;"><br /><strong>SCIERIE KOCHER S&agrave;rl</strong><br />Route de Buhl<br />67470 NIEDERROEDERN<br />T&eacute;l. : 03 88 86 51 51</div>');
			});
		}
	}
});