function load() {
	var zoom=16; 
	var point = new GLatLng(49.560476,22.199206);
  	var marker = new GMarker(point);
	
	if (GBrowserIsCompatible()) {
		var mapa = new GMap2(document.getElementById("mapka"));
		GEvent.addListener(marker, "click", function() {alert("Kwiaciarnia Melflor");});
		mapa.addControl(new GSmallZoomControl());
		mapa.setCenter(new GLatLng(49.560476,22.199206), zoom); 
    	mapa.addOverlay(marker);
   }
}

function toggleKol0() {
	$('#div-atelier').show();
	$('#div-sposa').hide();
}
function toggleKol1() {
	$('#div-atelier').hide();
	$('#div-sposa').show();
}

$(document).ready(function() {
		$('.LB').lightBox();
		$('.LB2').lightBox();	
		
		$('#imgarrow').bind('mouseenter', function(){
			$(this).attr('src', '/css/images/arrowon.gif');
		});
		$('#imgarrow').bind('mouseleave', function(){
			$(this).attr('src', '/css/images/arrow.gif');
		});
		
		$('#msg').ajaxStart(function() {
  			$(this).html('Trwa wysyłanie. Proszę czekać.');
		});
		
		$('#stick').bind('mouseenter', function(){
				$(this).animate({
			    right: '-1px',
				 height: '300px'
			  }, 300, function() {
			    otwarta=1;
			  });
		});
		
		$('#stick').bind('mouseleave', function(){
			$(this).animate({
				right: '-292px',
				height: '133px'
			}, 300, function() {
				otwarta=0;
			});
		});
		
		$('#nivo').nivoSlider({
			effect:'random', //Specify sets like: 'fold,fade,sliceDown'
			slices:20,
			animSpeed:800,
			pauseTime:3000,
			startSlide:0, //Set starting Slide (0 index)
			directionNav:false, //Next and Prev
			directionNavHide:false, //Only show on hover
			controlNav:false, //1,2,3...
			controlNavThumbs:false, //Use thumbnails for Control Nav
			controlNavThumbsFromRel:false, //Use image rel for thumbs
			controlNavThumbsSearch: '.jpg', //Replace this with...
			controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
			keyboardNav:true, //Use left and right arrows
			pauseOnHover:false, //Stop animation while hovering
			manualAdvance:false, //Force manual transitions
			captionOpacity:0.8, //Universal caption opacity
			beforeChange: function(){},
			afterChange: function(){},
			slideshowEnd: function(){} //Triggers after all slides have been shown
		});
		
});

function kontakt_form(id) {
	if(!$('#imie').val()) { alert("Proszę uzupełnić imię i nazwisko"); return false; }
	if(!$('#email').val()) { alert("Proszę podać e-mail"); return false; }
	if(!$('#tresc').val()) { alert("Proszę uzupełnić treść wiadomości"); return false; }
	
	imie=$('#imie').val();
  //	firma=$('#firma').val();
	email=$('#email').val();
	tresc=$('#tresc').val();
	
	$.ajax({
   	type: "GET",
	   url: "mail.php",
	   data: "imie="+imie+"&email="+email+"&tresc="+tresc+"",
	   success: function(msg){
	     $('#msg').html(msg);
		  $('#imie').val("");	
 //		  $('#firma').val("");
		  $('#email').val("");
		  $('#tresc').val("");
	   }
 	});
	
	return false;
}
