Cufon.replace('h1, h2', {
	textShadow: '1px 1px rgba(0, 0, 0, 0.1)'
});

Cufon.replace('#top_menu a, #bottom_menu a', {
	fontFamily: 'Myriad Pro',
	textShadow: '1px 1px rgba(0, 0, 0, 0.1)',
	hover: true
});

jQuery(document).ready(function()
{
	$('#page_referencje a.pos, #page_realizacje_pos a.pos').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - ",
		fade: 250
	});
	
	$('#page_referencje a.pos, #page_aktualnosci a.pos_thumb').flyout({destPadding: 0,
				startOffsetX: 0,
				startOffsetY: 0,
				loadingText: 'Wcztywanie...',
				closeTip: 'Kliknij aby schować'});

	$('#page_realizacje_pos a.pos').lightBox({
		overlayBgColor: '#999',
		overlayOpacity: 0.6,
		txtImage: 'Zdjęcie',
		txtOf: 'z'

	});

	$('.clearField').clearField();

	$("#page_realizacje .pos").mouseover(function(){ $(this).css({ "background-position":"left bottom" }); });
	$("#page_realizacje .pos").mouseout(function(){ $(this).css({ "background-position":"left top" }); });

	_initPribScroll();

	$('#kontakt_show_map').openDOMWindow({
		height: 480,
		width: 640,
		eventType:'click',
		windowPadding:10,
		windowSource:'inline',
		windowSourceID: 'gmaps',
		draggable:1,
		functionCallOnOpen: _gmaps_init
	});
});

/************************************************************* */

var globalMapTitle = 'P.P.H.U. GoldProfil - Nowe Chechło';

http://maps.google.pl/?ie=UTF8&ll=50.453897,18.927813&spn=0.037325,0.076303&z=14

function _initPribScroll()
{
	$("#prib_scroll").smoothDivScroll({
		scrollingHotSpotLeft: "a.scrollingHotSpotLeft",
		scrollingHotSpotRight: "a.scrollingHotSpotRight",
		scrollingSpeed: 1,
		autoScroll: "onstart",
		autoScrollDirection: "endlessloop",
		autoScrollSpeed: 1,
		mouseDownSpeedBooster: 3
	});
}

/************************************************************* */

function _gmaps_init()
{
	var myLatlng = new google.maps.LatLng(50.453897, 18.927813);

	var myOptions = {
	  zoom: 14,
	  center: myLatlng,
	  noClear: true,
	  mapTypeId: google.maps.MapTypeId.ROADMAP
	}

	var map = new google.maps.Map(document.getElementById("GMapHolder"), myOptions);

	var image = new google.maps.MarkerImage('_images/site/gmaps/ikona_mapa.gif',
		new google.maps.Size(71, 41),
		new google.maps.Point(0,0),
		new google.maps.Point(36, 41));

	var shadow = new google.maps.MarkerImage('_images/site/gmaps/cien_mapa.png',
      // The shadow image is larger in the horizontal dimension
      // while the position and offset are the same as for the main image.
      new google.maps.Size(82, 28),
      new google.maps.Point(0,0),
      new google.maps.Point(34, 28));

	var shape = {
		  coord: [1, 1, 1, 31, 71, 31, 71 , 1],
		  type: 'poly'
	  };

	var marker = new google.maps.Marker({
		position: myLatlng,
		map: map,
		shadow: shadow,
        icon: image,
        shape: shape,
		title: globalMapTitle
	});
}
