function rollOver( img, src ) {
  document.getElementById(img).src = src;
}
	jQuery(function($) {
		
		$('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
		
		$('ul.gallery_demo').galleria({
			history   : true, // activates the history object for bookmarking, back-button etc.
			clickNext : true, // helper for making the image clickable
			insert    : '#main_image', // the containing selector for our main image
			onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
				
				// fade in the image & caption
				if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { // FF/Win fades large images terribly slow
					image.css('display','none').fadeIn(1000);
				}
				caption.css('display','none').fadeIn(1000);
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// fade out inactive thumbnail
				_li.siblings().children('img.selected').fadeTo(500,0.3);
				
			}
		});
	});

// When the document loads do everything inside here ...
     $(document).ready(function(){
	 $('#contact_wojewodztwo').load('siecdystrybucyjna.php');	//by default initally load text from boo.php
         $('#contactmap area').click(function() { //start function when any link is clicked
		 				$("#contact_wojewodztwo").slideUp("slow");
						 var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
						 $("#contact_img_map").attr("src","images/contact_map_"+content_show+".gif");
							$.ajax({
							method: "get",url: "siecdystrybucyjna.php",data: "wojewodztwo="+content_show,
							beforeSend: function(){$("#contact_loading").show("slow");}, //show loading just when link is clicked
							complete: function(){ $("#contact_loading").hide("slow");}, //stop showing loading when the process is complete
							success: function(html){ //so, if data is retrieved, store it in html
							$("#contact_wojewodztwo").fadeIn("slow"); //animation
							$("#contact_wojewodztwo").html(html); //show the html inside .content div
					 }
				 }); //close $.ajax(
         }); //close click(
	 }); //close $(

	

